summaryrefslogtreecommitdiffstats
path: root/vio
diff options
context:
space:
mode:
authorBin Sun <bins@vmware.com>2018-04-08 14:03:14 +0800
committerBin Sun <bins@vmware.com>2018-04-08 14:03:48 +0800
commit5afc689af525edfad41d258fe572ca3bc3e45550 (patch)
tree49358bcf28cf887cb3e1a3981dfc4886b792889e /vio
parent8b6575a9c504034110a3c199f86127420f16a25b (diff)
Add image version test
Change-Id: I7950e7e4bb051b0da8ef762d08ed96916ed70078 Issue-ID: MULTICLOUD-199 Signed-off-by: Bin Sun <bins@vmware.com>
Diffstat (limited to 'vio')
-rw-r--r--vio/vio/tests/test_fake_image_view.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/vio/vio/tests/test_fake_image_view.py b/vio/vio/tests/test_fake_image_view.py
index 1de6fa3..d215156 100644
--- a/vio/vio/tests/test_fake_image_view.py
+++ b/vio/vio/tests/test_fake_image_view.py
@@ -57,3 +57,17 @@ class TestFakeImageSchema(unittest.TestCase):
}
resp = self.view.get(mock.Mock())
self.assertEqual(200, resp.status_code)
+
+
+class TestFakeImageVersion(unittest.TestCase):
+
+ def setUp(self):
+ self.view = views.FakeImageVersion()
+
+ @mock.patch.object(fakeResponse, "image_version")
+ def test_get(self, mock_image_version):
+ mock_image_version.return_value = {
+ "versions": [{"id": "v1.0"}]
+ }
+ resp = self.view.get(mock.Mock())
+ self.assertEqual(200, resp.status_code)