summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Lynn <ethanlynnl@vmware.com>2018-06-13 15:09:43 +0800
committerEthan Lynn <ethanlynnl@vmware.com>2018-06-13 15:09:43 +0800
commit66b963b27f3cf1f5910ac5c996f78fa62844dbde (patch)
treed5759065680fd46bff00bc56c8e95144bee07a33
parent0f79633c71e23b08e6fc8cf75fd67548e2942268 (diff)
Add TestFakeNovaHypervisorUptime
Add TestFakeNovaHypervisorUptime Change-Id: Ief1329d7a03061be23358f90dabad066812ae74a Issue-ID: MULTICLOUD-199 Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
-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 40278e5..6fbae51 100644
--- a/vio/vio/tests/test_fake_nova_view.py
+++ b/vio/vio/tests/test_fake_nova_view.py
@@ -164,6 +164,20 @@ class TestFakeNovaServer(unittest.TestCase):
self.assertEqual(405, resp.status_code)
+class TestFakeNovaHypervisorUptime(unittest.TestCase):
+
+ def setUp(self):
+ self.view = views.FakeNovaHypervisorsUptime()
+
+ def test_get_hypervisor_uptime(self):
+ req = mock.Mock()
+ req.META = {
+ "HTTP_X_AUTH_TOKEN": Token
+ }
+ resp = self.view.get(req, "tenant1", "hypervisor1")
+ self.assertEqual(200, resp.status_code)
+
+
class TestFakeNovaHypervisors(unittest.TestCase):
def setUp(self):