summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authortermie <github@anarkystic.com>2011-11-14 10:23:05 -0800
committertermie <github@anarkystic.com>2011-11-14 10:23:05 -0800
commit2c7770fc0d1ef0f55a2e96c8ef6086a2f7d29937 (patch)
tree7c66e2726d55cc494032f134f993b40b103a459e /tests
parent2d154828e7564f4025436d40cd5183c5f93b4273 (diff)
downloadkeystone-2c7770fc0d1ef0f55a2e96c8ef6086a2f7d29937.tar.gz
keystone-2c7770fc0d1ef0f55a2e96c8ef6086a2f7d29937.tar.xz
keystone-2c7770fc0d1ef0f55a2e96c8ef6086a2f7d29937.zip
add test for create user and get user
Diffstat (limited to 'tests')
-rw-r--r--tests/test_identity_api.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_identity_api.py b/tests/test_identity_api.py
index 885d4314..8799ff36 100644
--- a/tests/test_identity_api.py
+++ b/tests/test_identity_api.py
@@ -73,3 +73,16 @@ class IdentityApi(test.TestCase):
resp = c.get_tenants(user_id=self.user_foo['id'])
data = json.loads(resp.body)
self.assertDictEquals(self.tenant_bar, data[0])
+
+ def test_create_user(self):
+ token_id = self.options['admin_token']
+ c = client.TestClient(self.app, token=token_id)
+ user_ref = models.User()
+ resp = c.create_user(**user_ref)
+ data = json.loads(resp.body)
+ self.assert_(data['id'])
+
+ new_resp = c.get_user(user_id=data['id'])
+ new_data = json.loads(new_resp.body)
+
+ self.assertDictEquals(data, new_data)