summaryrefslogtreecommitdiffstats
path: root/vio
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2018-06-13 15:02:54 +0800
committerEthan Lynn <ethanlynnl@vmware.com>2018-06-13 15:02:54 +0800
commit9e63b89acf9acdc4afed49b453a5047aa5d28be4 (patch)
treeb0975f3d0f136c31fe22dc4fea61c924f27c6069 /vio
parent5019c376469ee09f09f36c82c444ee95734729bf (diff)
Add test_operate_server_unpause
Add test_operate_server_unpause Change-Id: I3fbc3939490265e1d42c45ac43bad97a8713b916 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.py14
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 daa753e..b97435a 100644
--- a/vio/vio/tests/test_fake_nova_view.py
+++ b/vio/vio/tests/test_fake_nova_view.py
@@ -125,6 +125,20 @@ class TestFakeNovaServer(unittest.TestCase):
self.assertEqual(
"SUSPENDED", fakeResponse.serverMapps[Server]['status'])
+ def test_operate_server_unpause(self):
+ req = mock.Mock()
+ req.META = {
+ "HTTP_X_AUTH_TOKEN": Token
+ }
+ req.body = json.dumps({
+ "unpause": {}
+ })
+ fakeResponse.serverMapps[Server]['status'] = "PAUSED"
+ resp = self.view.post(req, "abcd", Server)
+ self.assertEqual(202, resp.status_code)
+ self.assertEqual(
+ "ACTIVE", fakeResponse.serverMapps[Server]['status'])
+
class TestFakeNovaHypervisors(unittest.TestCase):