@@ -85,6 +85,23 @@ def httpserver(httpserver):
85
85
{"foo" : "bar" }, status = 200 , content_type = "application/scim+json"
86
86
)
87
87
88
+ httpserver .expect_request ("/Users/content-type-with-charset" ).respond_with_json (
89
+ {
90
+ "schemas" : ["urn:ietf:params:scim:schemas:core:2.0:User" ],
91
+ "id" : "2819c223-7f76-453a-919d-413861904646" ,
92
+
93
+ "meta" : {
94
+ "resourceType" : "User" ,
95
+ "created" : "2010-01-23T04:56:22Z" ,
96
+ "lastModified" : "2011-05-13T04:42:34Z" ,
97
+ "version" : 'W\\ /"3694e05e9dff590"' ,
98
+ "location" : "https://example.com/v2/Users/2819c223-7f76-453a-919d-413861904646" ,
99
+ },
100
+ },
101
+ status = 200 ,
102
+ content_type = "application/scim+json; charset=utf-8" ,
103
+ )
104
+
88
105
httpserver .expect_request ("/Users/bad-content-type" ).respond_with_json (
89
106
{
90
107
"schemas" : ["urn:ietf:params:scim:schemas:core:2.0:User" ],
@@ -518,6 +535,14 @@ def test_response_bad_status_code(client):
518
535
scim_client .query (User , "status-201" , check_status_code = False )
519
536
520
537
538
+ def test_response_content_type_with_charset (client ):
539
+ """Test sitations where servers return a valid content-type with a charset
540
+ information."""
541
+ scim_client = SCIMClient (client , resource_types = (User , Group ))
542
+ user = scim_client .query (User , "content-type-with-charset" )
543
+ assert isinstance (user , User )
544
+
545
+
521
546
def test_response_bad_content_type (client ):
522
547
"""Test sitations where servers return an invalid content-type response."""
523
548
scim_client = SCIMClient (
0 commit comments