Remove unnecessary usage of instance variable

This is to remove unnecessary usage of instance variable
to keep code clean.

Change-Id: Ia6aec6ddbe46ae23e9406ed1a938acd477d129a2
This commit is contained in:
zhufl 2017-07-31 16:54:37 +08:00
parent 0252bca0d9
commit 39bea7b68f
3 changed files with 6 additions and 6 deletions

View File

@ -35,7 +35,7 @@ class AccountQuotasNegativeTest(base.BaseObjectTest):
@classmethod
def resource_setup(cls):
super(AccountQuotasNegativeTest, cls).resource_setup()
cls.container_name = cls.create_container()
cls.create_container()
# Retrieve a ResellerAdmin auth data and use it to set a quota
# on the client's account

View File

@ -27,7 +27,7 @@ class StaticWebTest(base.BaseObjectTest):
super(StaticWebTest, cls).resource_setup()
# This header should be posted on the container before every test
cls.headers_public_read_acl = {'Read': '.r:*,.rlistings'}
headers_public_read_acl = {'Read': '.r:*,.rlistings'}
# Create test container and create one object in it
cls.container_name = cls.create_container()
@ -36,7 +36,7 @@ class StaticWebTest(base.BaseObjectTest):
cls.container_client.update_container_metadata(
cls.container_name,
metadata=cls.headers_public_read_acl,
metadata=headers_public_read_acl,
metadata_prefix="X-Container-")
@classmethod

View File

@ -65,10 +65,10 @@ class ObjectTempUrlNegativeTest(base.BaseObjectTest):
# create object
self.object_name = data_utils.rand_name(name='ObjectTemp')
self.content = data_utils.arbitrary_string(size=len(self.object_name),
base_text=self.object_name)
content = data_utils.arbitrary_string(size=len(self.object_name),
base_text=self.object_name)
self.object_client.create_object(self.container_name,
self.object_name, self.content)
self.object_name, content)
def _get_expiry_date(self, expiration_time=1000):
return int(time.time() + expiration_time)