diff --git a/nova/tests/unit/image/fake.py b/nova/tests/unit/image/fake.py index 3771feab33d1..8e4cd24c2afa 100644 --- a/nova/tests/unit/image/fake.py +++ b/nova/tests/unit/image/fake.py @@ -167,10 +167,10 @@ class _FakeImageService(object): trusted_certs=None): self.show(context, image_id) if data: - data.write(self._imagedata.get(image_id, '')) + data.write(self._imagedata.get(image_id, b'')) elif dst_path: with open(dst_path, 'wb') as data: - data.write(self._imagedata.get(image_id, '')) + data.write(self._imagedata.get(image_id, b'')) def show(self, context, image_id, include_locations=False, show_deleted=True):