diff options
author | 2018-04-08 14:31:55 +0800 | |
---|---|---|
committer | 2018-04-08 14:32:13 +0800 | |
commit | 3b0860d00b114ef5b55a6b2b9aa6124d2e543625 (patch) | |
tree | e85a629c25cab3140b5e9872fe4e784767e4059d /vio | |
parent | 5afc689af525edfad41d258fe572ca3bc3e45550 (diff) |
Add image download test
Change-Id: I71e23432d121ffc13a650e0646ce58ec12ddff6e
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.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 d215156..7a49014 100644 --- a/vio/vio/tests/test_fake_image_view.py +++ b/vio/vio/tests/test_fake_image_view.py @@ -71,3 +71,17 @@ class TestFakeImageVersion(unittest.TestCase): } resp = self.view.get(mock.Mock()) self.assertEqual(200, resp.status_code) + + +class TestFakeImageDownload(unittest.TestCase): + + def setUp(self): + self.view = views.FakeImageDownload() + + @mock.patch.object(fakeResponse, "image_detail") + def test_get(self, mock_image_version): + mock_image_version.return_value = { + "id": "1234abcd" + } + resp = self.view.get(mock.Mock(), "1234abcd") + self.assertEqual(200, resp.status_code) |