scim2-client 0.1.3__py3-none-any.whl → 0.1.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
scim2_client/client.py
CHANGED
|
@@ -106,7 +106,12 @@ class SCIMClient:
|
|
|
106
106
|
raise ValueError(f"Unknown resource type: '{resource_type}'")
|
|
107
107
|
|
|
108
108
|
def resource_endpoint(self, resource_type: Type):
|
|
109
|
-
|
|
109
|
+
try:
|
|
110
|
+
first_bracket_index = resource_type.__name__.index("[")
|
|
111
|
+
root_name = resource_type.__name__[:first_bracket_index]
|
|
112
|
+
except ValueError:
|
|
113
|
+
root_name = resource_type.__name__
|
|
114
|
+
return f"/{root_name}s"
|
|
110
115
|
|
|
111
116
|
def check_response(
|
|
112
117
|
self,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: scim2-client
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: Pythonically build SCIM requests and parse SCIM responses
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: scim,scim2,provisioning,httpx,api
|
|
@@ -65,7 +65,8 @@ assert user.meta.last_updated == datetime.datetime(
|
|
|
65
65
|
)
|
|
66
66
|
|
|
67
67
|
# Create resources
|
|
68
|
-
|
|
68
|
+
payload = User(user_name="bjensen@example.com")
|
|
69
|
+
response = scim.create(user)
|
|
69
70
|
assert isinstance(response, Error)
|
|
70
71
|
assert response.detail == "One or more of the attribute values are already in use or are reserved."
|
|
71
72
|
```
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
scim2_client/__init__.py,sha256=2UNsl6HNtVUv5LVcnmLaCHyT4SqAUUFOIWW2r5XGv6A,338
|
|
2
|
+
scim2_client/client.py,sha256=HzsOyb4xqUC05-HuhV18g5abYK-00AY0iCni4-XBEtA,17880
|
|
3
|
+
scim2_client/errors.py,sha256=uOOAwsD8rDrC8BQbwPid051YyWtexTcS8b7i6QC6-CM,1175
|
|
4
|
+
scim2_client-0.1.4.dist-info/METADATA,sha256=khpZeya8xou5elKL0lN9VUC2sMS6KgYFyL690kH7GfA,2662
|
|
5
|
+
scim2_client-0.1.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
6
|
+
scim2_client-0.1.4.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
scim2_client/__init__.py,sha256=2UNsl6HNtVUv5LVcnmLaCHyT4SqAUUFOIWW2r5XGv6A,338
|
|
2
|
-
scim2_client/client.py,sha256=1l7vb_OUPNzs-LP_yCmPEBafx3iwo1kgUNmWiucUDMc,17669
|
|
3
|
-
scim2_client/errors.py,sha256=uOOAwsD8rDrC8BQbwPid051YyWtexTcS8b7i6QC6-CM,1175
|
|
4
|
-
scim2_client-0.1.3.dist-info/METADATA,sha256=JxLH05nejwpIVxPOWwdsnujJed-D3ZwFPHwP9an-qc4,2654
|
|
5
|
-
scim2_client-0.1.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
6
|
-
scim2_client-0.1.3.dist-info/RECORD,,
|
|
File without changes
|