summaryrefslogtreecommitdiffstats
path: root/vio
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2018-06-13 14:45:19 +0800
committerEthan Lynn <ethanlynnl@vmware.com>2018-06-13 14:45:19 +0800
commit709787048e8ebba415b75348f2e7dc4703110d65 (patch)
treef507b738ee67e349d9cf9195f2e0cb40107ac2f3 /vio
parentf7765a56512b5dbad612fd6abee52dd22ada3238 (diff)
Add test_list_servers_unauth
Add test_list_servers_unauth Change-Id: Ie16ed282e0394aa06fce7728036994d425b026a0 Issue-ID: MULTICLOUD-199 Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
Diffstat (limited to 'vio')
-rw-r--r--vio/vio/tests/test_fake_nova_view.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/vio/vio/tests/test_fake_nova_view.py b/vio/vio/tests/test_fake_nova_view.py
index 5e56f0f..34c58a6 100644
--- a/vio/vio/tests/test_fake_nova_view.py
+++ b/vio/vio/tests/test_fake_nova_view.py
@@ -59,6 +59,14 @@ class TestFakeNovaServer(unittest.TestCase):
resp = self.view.get(req, "abcd")
self.assertEqual(200, resp.status_code)
+ def test_list_servers_unauth(self):
+ req = mock.Mock()
+ req.META = {
+ "HTTP_X_AUTH_TOKEN": "invalid"
+ }
+ resp = self.view.get(req, "abcd")
+ self.assertEqual(401, resp.status_code)
+
class TestFakeNovaHypervisors(unittest.TestCase):