summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vio/vio/tests/test_fake_identity_view.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/vio/vio/tests/test_fake_identity_view.py b/vio/vio/tests/test_fake_identity_view.py
index f8c673e..1f7b395 100644
--- a/vio/vio/tests/test_fake_identity_view.py
+++ b/vio/vio/tests/test_fake_identity_view.py
@@ -49,7 +49,7 @@ class TestFakeToken(unittest.TestCase):
@mock.patch.object(fakeResponse, "keystone_version")
def test_get_token(self, mock_keystone_version):
mock_keystone_version.return_value = {
- "version": "v2"
+ "version": "v3"
}
resp = self.view.get(mock.Mock())
self.assertEqual(200, resp.status_code)
@@ -65,3 +65,17 @@ class TestFakeToken(unittest.TestCase):
"token": {"value": Token}}
resp = self.view.post(req)
self.assertEqual(201, resp.status_code)
+
+
+class TestFakeTokenV2(unittest.TestCase):
+
+ def setUp(self):
+ self.view = views.FakeTokenV2()
+
+ @mock.patch.object(fakeResponse, "keystone_version2")
+ def test_get_tokenV2(self, mock_keystone_version2):
+ mock_keystone_version2.return_value = {
+ "version": "v2"
+ }
+ resp = self.view.get(mock.Mock())
+ self.assertEqual(200, resp.status_code)