summaryrefslogtreecommitdiffstats
path: root/vio
diff options
context:
space:
mode:
authorBin Sun <bins@vmware.com>2018-04-08 13:37:33 +0800
committerBin Sun <bins@vmware.com>2018-04-08 13:41:41 +0800
commit8b6575a9c504034110a3c199f86127420f16a25b (patch)
tree4a5b1ac85f702373a40f0ae6e22f4b5a16caaa3c /vio
parentde625c16fa9e59e4e335364565e74a034b766ff9 (diff)
Add image schema test
Change-Id: I16dc01b0473ba4ed0abd2ba33a44c7e7bfafdc3f 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 feb3569..1de6fa3 100644
--- a/vio/vio/tests/test_fake_image_view.py
+++ b/vio/vio/tests/test_fake_image_view.py
@@ -43,3 +43,17 @@ class TestFakeImage(unittest.TestCase):
}
resp = self.view.get(mock.Mock())
self.assertEqual(200, resp.status_code)
+
+
+class TestFakeImageSchema(unittest.TestCase):
+
+ def setUp(self):
+ self.view = views.FakeImageSchema()
+
+ @mock.patch.object(fakeResponse, "image_schema")
+ def test_get(self, mock_image_schema):
+ mock_image_schema.return_value = {
+ "name": "image"
+ }
+ resp = self.view.get(mock.Mock())
+ self.assertEqual(200, resp.status_code)