nova/nova/tests/unit/image
Matthew Booth 725f0d1e75 Py3 fix in fake image service
In py3, a file opened with 'b' must be written with a bytes object, not
a string (this restriction does not exist in py2):

 >>> f = open('/tmp/foo', 'wb+')
 >>> f.write('foo')
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
 TypeError: a bytes-like object is required, not 'str'

The fake image service's download method was writing '' by default when
no image data was present, which would result in the above exception if
we ever hit that code path. This fix changes it to b''.

Change-Id: Id4644f611fd48936b9ef036c18174dba0013c84a
2018-08-16 13:19:40 +00:00
..
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
abs.tar.gz move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
fake.py Py3 fix in fake image service 2018-08-16 13:19:40 +00:00
rel.tar.gz move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
test_fake.py Fix invalid import order 2016-07-04 16:03:42 +05:30
test_glance.py Implement certificate_utils 2018-06-12 14:44:32 -04:00