diff options
Diffstat (limited to 'glanceclient/tests')
| -rw-r--r-- | glanceclient/tests/unit/v2/test_images.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/glanceclient/tests/unit/v2/test_images.py b/glanceclient/tests/unit/v2/test_images.py index 7260f47..5b18e04 100644 --- a/glanceclient/tests/unit/v2/test_images.py +++ b/glanceclient/tests/unit/v2/test_images.py @@ -14,7 +14,7 @@ # under the License. import errno - +import mock import testtools from glanceclient import exc @@ -844,6 +844,12 @@ class TestController(testtools.TestCase): body = ''.join([b for b in body]) self.assertEqual('CCC', body) + def test_download_no_data(self): + resp = utils.FakeResponse(headers={}, status_code=204) + self.controller.http_client.get = mock.Mock(return_value=(resp, None)) + body = self.controller.data('image_id') + self.assertEqual(None, body) + def test_update_replace_prop(self): image_id = '3a4560a1-e585-443e-9b39-553b46ec92d1' params = {'name': 'pong'} |
