diff options
-rw-r--r-- | vio/vio/tests/test_fake_nova_view.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/vio/vio/tests/test_fake_nova_view.py b/vio/vio/tests/test_fake_nova_view.py index feab23b..35ff922 100644 --- a/vio/vio/tests/test_fake_nova_view.py +++ b/vio/vio/tests/test_fake_nova_view.py @@ -84,6 +84,20 @@ class TestFakeNovaServer(unittest.TestCase): self.assertEqual( "POWERING_OFF", fakeResponse.serverMapps[Server]['status']) + def test_operate_server_start(self): + req = mock.Mock() + req.META = { + "HTTP_X_AUTH_TOKEN": Token + } + req.body = json.dumps({ + "os-start": {} + }) + fakeResponse.serverMapps[Server]['status'] = "SHUTDOWN" + resp = self.view.post(req, "abcd", Server) + self.assertEqual(202, resp.status_code) + self.assertEqual( + "POWERING_ON", fakeResponse.serverMapps[Server]['status']) + class TestFakeNovaHypervisors(unittest.TestCase): |