Merge "Bump hacking"

This commit is contained in:
Zuul
2024-02-15 02:25:50 +00:00
committed by Gerrit Code Review
8 changed files with 12 additions and 10 deletions
@@ -57,5 +57,5 @@ class HttpHeadersTest(base.ClientTestBase):
image = glanceclient.glance.images.update(image.id,
disk_format="qcow2")
except Exception as e:
self.assertFalse("415 Unsupported Media Type" in e.details)
self.assertNotIn("415 Unsupported Media Type", e.details)
time.sleep(5)
+1 -1
View File
@@ -242,7 +242,7 @@ class TestUtils(testtools.TestCase):
# Regression test for bug 1461678.
def _iterate(i):
for chunk in i:
raise(IOError)
raise IOError()
data = io.StringIO('somestring')
data.close = mock.Mock()
+1 -1
View File
@@ -1468,7 +1468,7 @@ class TestController(testtools.TestCase):
headers = {'x-openstack-request-id': 'req-1234'}
fixture_idx = '/v2/images/%s' % (image_id)
orig_locations = data_fixtures[fixture_idx]['GET'][1]['locations']
loc_map = dict([(l['url'], l) for l in orig_locations])
loc_map = dict([(loc['url'], loc) for loc in orig_locations])
loc_map[new_loc['url']] = new_loc
mod_patch = [{'path': '/locations', 'op': 'replace',
'value': list(loc_map.values())}]
+2 -2
View File
@@ -61,8 +61,8 @@ _SCHEMA = schemas.Schema({
def compare_json_patches(a, b):
"""Return 0 if a and b describe the same JSON patch."""
return(jsonpatch.JsonPatch.from_string(a) ==
jsonpatch.JsonPatch.from_string(b))
return (jsonpatch.JsonPatch.from_string(a) ==
jsonpatch.JsonPatch.from_string(b))
class TestSchemaProperty(testtools.TestCase):