summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2018-03-27 08:25:41 -0700
committerEthan Lynn <ethanlynnl@vmware.com>2018-03-27 08:25:41 -0700
commit3f78917708f7074d055b9f4d0874b91a4a3be92c (patch)
tree497cf2b78055ca53b67ef78770768f6bc6cc86d0
parenta0ceb13d65e42fe262ef5021074447fd0f826117 (diff)
Add test_delete for TokenView
Add test_delete Change-Id: I66955b173658a1765f9d6a6ddb1f90f4aa2193f4 Issue-ID: MULTICLOUD-199 Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
-rw-r--r--vio/vio/tests/test_proxy_identity_view.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/vio/vio/tests/test_proxy_identity_view.py b/vio/vio/tests/test_proxy_identity_view.py
index b60725c..d3a52b8 100644
--- a/vio/vio/tests/test_proxy_identity_view.py
+++ b/vio/vio/tests/test_proxy_identity_view.py
@@ -80,3 +80,14 @@ class TestTokenView(unittest.TestCase):
req.get_full_path.return_value = "identity/v2.0"
resp = self.view.get(req, "vmware_nova")
self.assertEqual(resp.status_code, 405)
+
+ @mock.patch.object(BaseClient, "buildRequest")
+ @mock.patch.object(BaseClient, "_request")
+ def test_delete(self, mock_req, mock_build):
+ req = mock.Mock()
+ req.META = {
+ "HTTP_X_SUBJECT_TOKEN": "aaa"
+ }
+ mock_build.return_value = ("http://onap.org", {}, None)
+ self.view.delete(req, "openstack_regionone")
+ mock_req.assert_called_once()