Remove unused variable assignment
Some variables are assigned but not used, this is to remove them for code clean. Change-Id: Iaf5cace94f8b116e18c757ba4098e5f523c508c4
This commit is contained in:
parent
e56964dfbe
commit
311104e791
@ -119,7 +119,7 @@ class BasicOperationsImagesTest(base.BaseV2ImageTest):
|
||||
|
||||
# Update Image
|
||||
new_image_name = data_utils.rand_name('new-image')
|
||||
body = self.client.update_image(image['id'], [
|
||||
self.client.update_image(image['id'], [
|
||||
dict(replace='/name', value=new_image_name)])
|
||||
|
||||
# Verifying updating
|
||||
|
@ -75,7 +75,7 @@ class ExtraDHCPOptionsTestJSON(base.BaseNetworkTest):
|
||||
def test_update_show_port_with_extra_dhcp_options(self):
|
||||
# Update port with extra dhcp options
|
||||
name = data_utils.rand_name('new-port-name')
|
||||
body = self.ports_client.update_port(
|
||||
self.ports_client.update_port(
|
||||
self.port['id'],
|
||||
name=name,
|
||||
extra_dhcp_opts=self.extra_dhcp_opts)
|
||||
|
@ -103,7 +103,7 @@ class ObjectTempUrlTest(base.BaseObjectTest):
|
||||
self.assertEqual(body, self.content)
|
||||
|
||||
# Testing a HEAD on this Temp URL
|
||||
resp, body = self.object_client.head(url)
|
||||
resp, _ = self.object_client.head(url)
|
||||
self.assertHeaders(resp, 'Object', 'HEAD')
|
||||
|
||||
@decorators.idempotent_id('671f9583-86bd-4128-a034-be282a68c5d8')
|
||||
@ -142,11 +142,11 @@ class ObjectTempUrlTest(base.BaseObjectTest):
|
||||
expires, self.key)
|
||||
|
||||
# trying to put random data in the object using temp url
|
||||
resp, body = self.object_client.put(url, new_data, None)
|
||||
resp, _ = self.object_client.put(url, new_data, None)
|
||||
self.assertHeaders(resp, 'Object', 'PUT')
|
||||
|
||||
# Testing a HEAD on this Temp URL
|
||||
resp, body = self.object_client.head(url)
|
||||
resp, _ = self.object_client.head(url)
|
||||
self.assertHeaders(resp, 'Object', 'HEAD')
|
||||
|
||||
# Validate that the content of the object has been modified
|
||||
|
@ -51,7 +51,7 @@ class ContainerTest(base.BaseObjectTest):
|
||||
def test_versioned_container(self):
|
||||
# create container
|
||||
vers_container_name = data_utils.rand_name(name='TestVersionContainer')
|
||||
resp, body = self.container_client.create_container(
|
||||
resp, _ = self.container_client.create_container(
|
||||
vers_container_name)
|
||||
self.containers.append(vers_container_name)
|
||||
self.assertHeaders(resp, 'Container', 'PUT')
|
||||
@ -59,7 +59,7 @@ class ContainerTest(base.BaseObjectTest):
|
||||
|
||||
base_container_name = data_utils.rand_name(name='TestBaseContainer')
|
||||
headers = {'X-versions-Location': vers_container_name}
|
||||
resp, body = self.container_client.create_container(
|
||||
resp, _ = self.container_client.create_container(
|
||||
base_container_name,
|
||||
metadata=headers,
|
||||
metadata_prefix='')
|
||||
@ -76,20 +76,20 @@ class ContainerTest(base.BaseObjectTest):
|
||||
data_2 = data_utils.random_bytes()
|
||||
resp, _ = self.object_client.create_object(base_container_name,
|
||||
object_name, data_2)
|
||||
resp, body = self.object_client.get_object(base_container_name,
|
||||
object_name)
|
||||
_, body = self.object_client.get_object(base_container_name,
|
||||
object_name)
|
||||
self.assertEqual(body, data_2)
|
||||
# delete object version 2
|
||||
resp, _ = self.object_client.delete_object(base_container_name,
|
||||
object_name)
|
||||
self.assertContainer(base_container_name, '1', '1024',
|
||||
vers_container_name)
|
||||
resp, body = self.object_client.get_object(base_container_name,
|
||||
object_name)
|
||||
_, body = self.object_client.get_object(base_container_name,
|
||||
object_name)
|
||||
self.assertEqual(body, data_1)
|
||||
# delete object version 1
|
||||
resp, _ = self.object_client.delete_object(base_container_name,
|
||||
object_name)
|
||||
self.object_client.delete_object(base_container_name,
|
||||
object_name)
|
||||
# containers should be empty
|
||||
self.assertContainer(base_container_name, '0', '0',
|
||||
vers_container_name)
|
||||
|
Loading…
Reference in New Issue
Block a user