diff options
author | Ethan Lynn <ethanlynnl@vmware.com> | 2018-06-13 14:45:19 +0800 |
---|---|---|
committer | Ethan Lynn <ethanlynnl@vmware.com> | 2018-06-13 14:45:19 +0800 |
commit | 709787048e8ebba415b75348f2e7dc4703110d65 (patch) | |
tree | f507b738ee67e349d9cf9195f2e0cb40107ac2f3 | |
parent | f7765a56512b5dbad612fd6abee52dd22ada3238 (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>
-rw-r--r-- | vio/vio/tests/test_fake_nova_view.py | 8 |
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): |