diff options
| author | Jenkins <jenkins@review.openstack.org> | 2014-07-24 21:30:53 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2014-07-24 21:30:53 +0000 |
| commit | e58f7999f9011c7810b61483f8389713dfa7c72a (patch) | |
| tree | bb81caad0c57c96e7fe186eca9733e15af508895 /keystoneclient/tests/auth | |
| parent | 82e45a6f5cb3e63d60d369d9fe06cb29e0a699e3 (diff) | |
| parent | 0e9ecaa1547306f7af6527126fb88f8151908498 (diff) | |
| download | python-keystoneclient-0.10.1.tar.gz | |
Merge "Don't log sensitive auth data"0.10.1
Diffstat (limited to 'keystoneclient/tests/auth')
| -rw-r--r-- | keystoneclient/tests/auth/test_identity_v2.py | 12 | ||||
| -rw-r--r-- | keystoneclient/tests/auth/test_identity_v3.py | 13 |
2 files changed, 25 insertions, 0 deletions
diff --git a/keystoneclient/tests/auth/test_identity_v2.py b/keystoneclient/tests/auth/test_identity_v2.py index a264edd..0beea83 100644 --- a/keystoneclient/tests/auth/test_identity_v2.py +++ b/keystoneclient/tests/auth/test_identity_v2.py @@ -11,6 +11,7 @@ # under the License. import copy +import uuid import httpretty from six.moves import urllib @@ -255,3 +256,14 @@ class V2IdentityPlugin(utils.TestCase): self.assertEqual('token1', s.get_token()) a.invalidate() self.assertEqual('token2', s.get_token()) + + @httpretty.activate + def test_doesnt_log_password(self): + self.stub_auth(json=self.TEST_RESPONSE_DICT) + password = uuid.uuid4().hex + + a = v2.Password(self.TEST_URL, username=self.TEST_USER, + password=password) + s = session.Session(auth=a) + self.assertEqual(self.TEST_TOKEN, s.get_token()) + self.assertNotIn(password, self.logger.output) diff --git a/keystoneclient/tests/auth/test_identity_v3.py b/keystoneclient/tests/auth/test_identity_v3.py index d44c8e7..a147a31 100644 --- a/keystoneclient/tests/auth/test_identity_v3.py +++ b/keystoneclient/tests/auth/test_identity_v3.py @@ -11,6 +11,7 @@ # under the License. import copy +import uuid import httpretty from six.moves import urllib @@ -408,3 +409,15 @@ class V3IdentityPlugin(utils.TestCase): self.assertEqual('token1', s.get_token()) a.invalidate() self.assertEqual('token2', s.get_token()) + + @httpretty.activate + def test_doesnt_log_password(self): + self.stub_auth(json=self.TEST_RESPONSE_DICT) + + password = uuid.uuid4().hex + a = v3.Password(self.TEST_URL, username=self.TEST_USER, + password=password) + s = session.Session(a) + self.assertEqual(self.TEST_TOKEN, s.get_token()) + + self.assertNotIn(password, self.logger.output) |
