summaryrefslogtreecommitdiffstats
path: root/vio
diff options
context:
space:
mode:
authorBin Sun <bins@vmware.com>2018-04-12 10:17:30 +0800
committerBin Sun <bins@vmware.com>2018-04-12 10:17:54 +0800
commit6f59c780573ef4380871cb7de941b3b9150d1a98 (patch)
tree76966bb702df244d730fdcfea678e1b8e67a323f /vio
parent664c40cc0890374b7110fb477edd7d2be87edd67 (diff)
Add fake get token test
Change-Id: I4a975d78dde56643b43b9098da4c4aa706f13af8 Issue-ID: MULTICLOUD-199 Signed-off-by: Bin Sun <bins@vmware.com>
Diffstat (limited to 'vio')
-rw-r--r--vio/vio/tests/test_fake_identity_view.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/vio/vio/tests/test_fake_identity_view.py b/vio/vio/tests/test_fake_identity_view.py
index 58f5b61..7d802ff 100644
--- a/vio/vio/tests/test_fake_identity_view.py
+++ b/vio/vio/tests/test_fake_identity_view.py
@@ -38,3 +38,17 @@ class TestFakeProjects(unittest.TestCase):
}
resp = self.view.get(req, "1234abcd")
self.assertEqual(200, resp.status_code)
+
+
+class TestFakeToken(unittest.TestCase):
+
+ def setUp(self):
+ self.view = views.FakeToken()
+
+ @mock.patch.object(fakeResponse, "keystone_version")
+ def test_get_token(self, mock_keystone_version):
+ mock_keystone_version.return_value = {
+ "version": "v2"
+ }
+ resp = self.view.get(mock.Mock())
+ self.assertEqual(200, resp.status_code)