aboutsummaryrefslogtreecommitdiffstats
path: root/keystone-moon/keystone/tests/unit/test_token_provider.py
diff options
context:
space:
mode:
Diffstat (limited to 'keystone-moon/keystone/tests/unit/test_token_provider.py')
-rw-r--r--keystone-moon/keystone/tests/unit/test_token_provider.py10
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