summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 d1e666c..feb3569 100644
--- a/vio/vio/tests/test_fake_image_view.py
+++ b/vio/vio/tests/test_fake_image_view.py
@@ -29,3 +29,17 @@ class TestFakeImageDetail(unittest.TestCase):
}
resp = self.view.get(mock.Mock(), "1234abcd")
self.assertEqual(200, resp.status_code)
+
+
+class TestFakeImage(unittest.TestCase):
+
+ def setUp(self):
+ self.view = views.FakeImage()
+
+ @mock.patch.object(fakeResponse, "list_image")
+ def test_get(self, mock_list_image):
+ mock_list_image.return_value = {
+ "images": [{"id": "1234abcd"}]
+ }
+ resp = self.view.get(mock.Mock())
+ self.assertEqual(200, resp.status_code)