diff options
-rw-r--r-- | vio/vio/tests/test_fake_image_view.py | 14 |
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) |