diff options
-rw-r--r-- | vio/vio/tests/test_fake_identity_view.py | 16 |
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 8f3d23a..e27a8c4 100644 --- a/vio/vio/tests/test_fake_identity_view.py +++ b/vio/vio/tests/test_fake_identity_view.py @@ -82,7 +82,7 @@ class TestFakeTokenV2(unittest.TestCase): @mock.patch("requests.post") @mock.patch.object(fakeResponse, "keystone_tokenV2") - def test_create_token(self, mock_keystone_tokenV2, mock_post): + def test_create_tokenV2(self, mock_keystone_tokenV2, mock_post): req = mock.Mock() req.get_full_path.return_value = "identity/v2.0/tokens" req.body = json.dumps( @@ -91,3 +91,17 @@ class TestFakeTokenV2(unittest.TestCase): "token": {"value": Token}} resp = self.view.post(req) self.assertEqual(200, resp.status_code) + + +class TestFakeTenants(unittest.TestCase): + + def setUp(self): + self.view = views.FakeTenants() + + @mock.patch.object(fakeResponse, "get_tenants") + def test_get_tanent(self, mock_get_tenants): + mock_get_tenants.return_value = { + "tenant": "1234abbcd" + } + resp = self.view.get(mock.Mock()) + self.assertEqual(200, resp.status_code) |