summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2018-06-13 14:42:11 +0800
committerEthan Lynn <ethanlynnl@vmware.com>2018-06-13 14:42:11 +0800
commit40aa9b56ed90a11a776d86889e3a565539524b41 (patch)
tree2c148eb30ad323d5fd72ce3d236396ebc33c1db2
parent177a094e0d10d817a3ee7508fdba1c77f5ca55c3 (diff)
Add test_list_projects_unauth
Add test_list_projects_unauth Change-Id: I385a589881ebcdbdb8d90c9c3d55598e745f151c Issue-ID: MULTICLOUD-199 Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
-rw-r--r--vio/vio/tests/test_fake_identity_view.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/vio/vio/tests/test_fake_identity_view.py b/vio/vio/tests/test_fake_identity_view.py
index 0bea44d..2dde2d6 100644
--- a/vio/vio/tests/test_fake_identity_view.py
+++ b/vio/vio/tests/test_fake_identity_view.py
@@ -49,6 +49,14 @@ class TestFakeProjects(unittest.TestCase):
self.assertEqual(200, resp.status_code)
self.assertEqual(3, len(resp.data['projects']))
+ def test_list_projects_unauth(self):
+ req = mock.Mock()
+ req.META = {
+ "HTTP_X_AUTH_TOKEN": "invalid"
+ }
+ resp = self.view.get(req)
+ self.assertEqual(401, resp.status_code)
+
class TestFakeToken(unittest.TestCase):