scim2-client 0.1.3__tar.gz → 0.1.4__tar.gz
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-0.1.3 → scim2_client-0.1.4}/PKG-INFO +3 -2
- {scim2_client-0.1.3 → scim2_client-0.1.4}/README.md +2 -1
- {scim2_client-0.1.3 → scim2_client-0.1.4}/pyproject.toml +1 -1
- {scim2_client-0.1.3 → scim2_client-0.1.4}/scim2_client/client.py +6 -1
- {scim2_client-0.1.3 → scim2_client-0.1.4}/scim2_client/__init__.py +0 -0
- {scim2_client-0.1.3 → scim2_client-0.1.4}/scim2_client/errors.py +0 -0
|
@@ -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
|
```
|
|
@@ -40,7 +40,8 @@ assert user.meta.last_updated == datetime.datetime(
|
|
|
40
40
|
)
|
|
41
41
|
|
|
42
42
|
# Create resources
|
|
43
|
-
|
|
43
|
+
payload = User(user_name="bjensen@example.com")
|
|
44
|
+
response = scim.create(user)
|
|
44
45
|
assert isinstance(response, Error)
|
|
45
46
|
assert response.detail == "One or more of the attribute values are already in use or are reserved."
|
|
46
47
|
```
|
|
@@ -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,
|
|
File without changes
|
|
File without changes
|