summaryrefslogtreecommitdiffstats
path: root/vio
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2018-06-13 15:04:52 +0800
committerEthan Lynn <ethanlynnl@vmware.com>2018-06-13 15:04:52 +0800
commit0f79633c71e23b08e6fc8cf75fd67548e2942268 (patch)
tree14dc96698430d3bfc037fc8a89de3dd0a48194ee /vio
parentbccba0b9435bfdbcd37c11b89b4a6b1e0653fedb (diff)
Add test_operate_server_unsupport
Add test_operate_server_unsupport Change-Id: Iad681f11ccd75b950fa6c650d9308ac026fc9965 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.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/vio/vio/tests/test_fake_nova_view.py b/vio/vio/tests/test_fake_nova_view.py
index e126e32..40278e5 100644
--- a/vio/vio/tests/test_fake_nova_view.py
+++ b/vio/vio/tests/test_fake_nova_view.py
@@ -152,6 +152,17 @@ class TestFakeNovaServer(unittest.TestCase):
self.assertEqual(
"REBOOTING", fakeResponse.serverMapps[Server]['status'])
+ def test_operate_server_unsupport(self):
+ req = mock.Mock()
+ req.META = {
+ "HTTP_X_AUTH_TOKEN": Token
+ }
+ req.body = json.dumps({
+ "invalid": {}
+ })
+ resp = self.view.post(req, "abcd", Server)
+ self.assertEqual(405, resp.status_code)
+
class TestFakeNovaHypervisors(unittest.TestCase):