diff options
author | DUVAL Thomas <thomas.duval@orange.com> | 2016-06-09 09:11:50 +0200 |
---|---|---|
committer | DUVAL Thomas <thomas.duval@orange.com> | 2016-06-09 09:11:50 +0200 |
commit | 2e7b4f2027a1147ca28301e4f88adf8274b39a1f (patch) | |
tree | 8b8d94001ebe6cc34106cf813b538911a8d66d9a /keystone-moon/keystone/tests/unit/test_token_provider.py | |
parent | a33bdcb627102a01244630a54cb4b5066b385a6a (diff) |
Update Keystone core to Mitaka.
Change-Id: Ia10d6add16f4a9d25d1f42d420661c46332e69db
Diffstat (limited to 'keystone-moon/keystone/tests/unit/test_token_provider.py')
-rw-r--r-- | keystone-moon/keystone/tests/unit/test_token_provider.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/keystone-moon/keystone/tests/unit/test_token_provider.py b/keystone-moon/keystone/tests/unit/test_token_provider.py index f60f7d53..5c71363b 100644 --- a/keystone-moon/keystone/tests/unit/test_token_provider.py +++ b/keystone-moon/keystone/tests/unit/test_token_provider.py @@ -16,6 +16,7 @@ import datetime from oslo_config import cfg from oslo_utils import timeutils +from six.moves import reload_module from keystone.common import dependency from keystone.common import utils @@ -781,6 +782,12 @@ class TestTokenProvider(unit.TestCase): self.assertIsNone( self.token_provider_api._is_valid_token(create_v3_token())) + def test_no_token_raises_token_not_found(self): + self.assertRaises( + exception.TokenNotFound, + self.token_provider_api.validate_token, + None) + # NOTE(ayoung): renamed to avoid automatic test detection class PKIProviderTests(object): @@ -803,7 +810,8 @@ class PKIProviderTests(object): self.cms.subprocess = self.target_subprocess self.environment.subprocess = self.target_subprocess - reload(pki) # force module reload so the imports get re-evaluated + # force module reload so the imports get re-evaluated + reload_module(pki) def test_get_token_id_error_handling(self): # cause command-line failure |