summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortermie <github@anarkystic.com>2012-01-23 17:18:47 -0800
committertermie <github@anarkystic.com>2012-01-23 17:18:47 -0800
commitda4f95527953938692627a9ba12f21731cb1c12e (patch)
tree4402cb837dad2da58997aab41f9aad7fe1834662
parent8ad8d88dc65daf2662fde34033619a4918be6129 (diff)
downloadkeystone-da4f95527953938692627a9ba12f21731cb1c12e.tar.gz
keystone-da4f95527953938692627a9ba12f21731cb1c12e.tar.xz
keystone-da4f95527953938692627a9ba12f21731cb1c12e.zip
strip password before checking output
-rw-r--r--tests/test_backend.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_backend.py b/tests/test_backend.py
index 1d4edd5b..30ff3eda 100644
--- a/tests/test_backend.py
+++ b/tests/test_backend.py
@@ -24,6 +24,10 @@ class IdentityTests(object):
user_ref, tenant_ref, metadata_ref = self.identity_api.authenticate(
user_id=self.user_foo['id'],
password=self.user_foo['password'])
+ # NOTE(termie): the password field is left in user_foo to make it easier
+ # to authenticate in tests, but should not be returned by
+ # the api
+ self.user_foo.pop('password')
self.assertDictEquals(user_ref, self.user_foo)
self.assert_(tenant_ref is None)
self.assert_(not metadata_ref)
@@ -33,6 +37,10 @@ class IdentityTests(object):
user_id=self.user_foo['id'],
tenant_id=self.tenant_bar['id'],
password=self.user_foo['password'])
+ # NOTE(termie): the password field is left in user_foo to make it easier
+ # to authenticate in tests, but should not be returned by
+ # the api
+ self.user_foo.pop('password')
self.assertDictEquals(user_ref, self.user_foo)
self.assertDictEquals(tenant_ref, self.tenant_bar)
self.assertDictEquals(metadata_ref, self.metadata_foobar)
@@ -63,6 +71,10 @@ class IdentityTests(object):
def test_get_user(self):
user_ref = self.identity_api.get_user(user_id=self.user_foo['id'])
+ # NOTE(termie): the password field is left in user_foo to make it easier
+ # to authenticate in tests, but should not be returned by
+ # the api
+ self.user_foo.pop('password')
self.assertDictEquals(user_ref, self.user_foo)
def test_get_metadata_bad_user(self):