From a0ceb13d65e42fe262ef5021074447fd0f826117 Mon Sep 17 00:00:00 2001 From: Ethan Lynn Date: Tue, 27 Mar 2018 08:22:40 -0700 Subject: Add test_get_v2 for TokenView Add test_get_v2 Change-Id: I65346b67d0efdd83dfabbd8ade1d33139f103e9d Issue-ID: MULTICLOUD-199 Signed-off-by: Ethan Lynn --- vio/vio/tests/test_proxy_identity_view.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vio/vio/tests/test_proxy_identity_view.py b/vio/vio/tests/test_proxy_identity_view.py index d9364ab..b60725c 100644 --- a/vio/vio/tests/test_proxy_identity_view.py +++ b/vio/vio/tests/test_proxy_identity_view.py @@ -73,3 +73,10 @@ class TestTokenView(unittest.TestCase): mock_req.return_value = res resp = self.view.get(req, "vmware_nova") self.assertEqual(resp.status_code, 200) + + @mock.patch.object(extsys, "get_vim_by_id") + def test_get_v2(self, mock_getvim): + req = mock.Mock() + req.get_full_path.return_value = "identity/v2.0" + resp = self.view.get(req, "vmware_nova") + self.assertEqual(resp.status_code, 405) -- cgit 1.2.3-korg