Replace confusing member name
Replace the member name 'data' in test_object_slo.py and
test_object_temp_url_negative.py with 'content', because 'data' member
is used as a class member name for the instace of DataGenerator in the parent
BaseObjectTest class.
Change-Id: I24f102531afaffd7e797e588777d4621be7a1084
Closes-bug: #1276835
diff --git a/tempest/api/object_storage/test_object_slo.py b/tempest/api/object_storage/test_object_slo.py
index 0443a80..159ad5c 100644
--- a/tempest/api/object_storage/test_object_slo.py
+++ b/tempest/api/object_storage/test_object_slo.py
@@ -59,23 +59,23 @@
object_name_base_1 = object_name + '_01'
object_name_base_2 = object_name + '_02'
data_size = MIN_SEGMENT_SIZE
- self.data = data_utils.arbitrary_string(data_size)
+ self.content = data_utils.arbitrary_string(data_size)
self._create_object(self.container_name,
object_name_base_1,
- self.data)
+ self.content)
self._create_object(self.container_name,
object_name_base_2,
- self.data)
+ self.content)
path_object_1 = '/%s/%s' % (self.container_name,
object_name_base_1)
path_object_2 = '/%s/%s' % (self.container_name,
object_name_base_2)
data_manifest = [{'path': path_object_1,
- 'etag': hashlib.md5(self.data).hexdigest(),
+ 'etag': hashlib.md5(self.content).hexdigest(),
'size_bytes': data_size},
{'path': path_object_2,
- 'etag': hashlib.md5(self.data).hexdigest(),
+ 'etag': hashlib.md5(self.content).hexdigest(),
'size_bytes': data_size}]
return json.dumps(data_manifest)
@@ -147,7 +147,7 @@
self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
self._assertHeadersSLO(resp, 'GET')
- sum_data = self.data + self.data
+ sum_data = self.content + self.content
self.assertEqual(body, sum_data)
@test.attr(type='gate')
diff --git a/tempest/api/object_storage/test_object_temp_url_negative.py b/tempest/api/object_storage/test_object_temp_url_negative.py
index 7d26433..8c0a671 100644
--- a/tempest/api/object_storage/test_object_temp_url_negative.py
+++ b/tempest/api/object_storage/test_object_temp_url_negative.py
@@ -69,10 +69,10 @@
# create object
self.object_name = data_utils.rand_name(name='ObjectTemp')
- self.data = data_utils.arbitrary_string(size=len(self.object_name),
- base_text=self.object_name)
+ self.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.data)
+ self.object_name, self.content)
def _get_expiry_date(self, expiration_time=1000):
return int(time.time() + expiration_time)