Skip to content

Commit 9bb5ea4

Browse files
authored
fix diff space (#410)
1 parent 8b78771 commit 9bb5ea4

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

descope/management/tenant.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def load(
109109
110110
Return value (dict):
111111
Return dict in the format
112-
{"id": <id>, "name": <name>, "selfProvisioningDomains": [], "customAttributes: {}}
112+
{"id": <id>, "name": <name>, "selfProvisioningDomains": [], "customAttributes: {}, "createdTime": <timestamp>}
113113
Containing the loaded tenant information.
114114
115115
Raise:
@@ -130,7 +130,7 @@ def load_all(
130130
131131
Return value (dict):
132132
Return dict in the format
133-
{"tenants": [{"id": <id>, "name": <name>, "selfProvisioningDomains": [], customAttributes: {}}]}
133+
{"tenants": [{"id": <id>, "name": <name>, "selfProvisioningDomains": [], customAttributes: {}, "createdTime": <timestamp>}]}
134134
Containing the loaded tenant information.
135135
136136
Raise:

tests/management/test_tenant.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,13 @@ def test_load(self):
216216
network_resp.ok = True
217217
network_resp.json.return_value = json.loads(
218218
"""
219-
{"id": "t1", "name": "tenant1", "selfProvisioningDomains": ["domain1.com"]}
219+
{"id": "t1", "name": "tenant1", "selfProvisioningDomains": ["domain1.com"], "createdTime": 172606520}
220220
"""
221221
)
222222
mock_get.return_value = network_resp
223223
resp = client.mgmt.tenant.load("t1")
224224
self.assertEqual(resp["name"], "tenant1")
225+
self.assertEqual(resp["createdTime"], 172606520)
225226
mock_get.assert_called_with(
226227
f"{common.DEFAULT_BASE_URL}{MgmtV1.tenant_load_path}",
227228
headers={
@@ -255,8 +256,8 @@ def test_load_all(self):
255256
"""
256257
{
257258
"tenants": [
258-
{"id": "t1", "name": "tenant1", "selfProvisioningDomains": ["domain1.com"]},
259-
{"id": "t2", "name": "tenant2", "selfProvisioningDomains": ["domain1.com"]}
259+
{"id": "t1", "name": "tenant1", "selfProvisioningDomains": ["domain1.com"], "createdTime": 172606520},
260+
{"id": "t2", "name": "tenant2", "selfProvisioningDomains": ["domain1.com"], "createdTime": 172606520}
260261
]
261262
}
262263
"""
@@ -267,6 +268,7 @@ def test_load_all(self):
267268
self.assertEqual(len(tenants), 2)
268269
self.assertEqual(tenants[0]["name"], "tenant1")
269270
self.assertEqual(tenants[1]["name"], "tenant2")
271+
self.assertEqual(tenants[0]["createdTime"], 172606520)
270272
mock_get.assert_called_with(
271273
f"{common.DEFAULT_BASE_URL}{MgmtV1.tenant_load_all_path}",
272274
headers={

0 commit comments

Comments
 (0)