From 75d3130ab248723d324dbcd2026d14f75185cf88 Mon Sep 17 00:00:00 2001 From: TerryHowe Date: Mon, 27 Apr 2015 13:51:39 -0600 Subject: Remove unique class names because they are scoped Remove unique class names because they are module scoped. Also, add cleanup of the tmp file in the object test. Change-Id: I8107a02b13ff87793ba1e56e0f0ad26890f24369 --- functional/tests/object/v1/test_object.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'functional/tests/object') diff --git a/functional/tests/object/v1/test_object.py b/functional/tests/object/v1/test_object.py index 5e9ac72c..289e1ca7 100644 --- a/functional/tests/object/v1/test_object.py +++ b/functional/tests/object/v1/test_object.py @@ -20,15 +20,17 @@ CONTAINER_FIELDS = ['account', 'container', 'x-trans-id'] OBJECT_FIELDS = ['object', 'container', 'etag'] -class ObjectV1Tests(test.TestCase): - """Functional tests for Object V1 commands. """ +class ObjectTests(test.TestCase): + """Functional tests for Object commands. """ CONTAINER_NAME = uuid.uuid4().hex OBJECT_NAME = uuid.uuid4().hex + TMP_FILE = 'tmp.txt' def setUp(self): - super(ObjectV1Tests, self).setUp() + super(ObjectTests, self).setUp() self.addCleanup(os.remove, self.OBJECT_NAME) + self.addCleanup(os.remove, self.TMP_FILE) with open(self.OBJECT_NAME, 'w') as f: f.write('test content') @@ -61,7 +63,7 @@ class ObjectV1Tests(test.TestCase): # TODO(stevemar): Assert returned fields self.openstack('object save ' + self.CONTAINER_NAME - + ' ' + self.OBJECT_NAME + ' --file tmp.txt') + + ' ' + self.OBJECT_NAME + ' --file ' + self.TMP_FILE) # TODO(stevemar): Assert returned fields self.openstack('object show ' + self.CONTAINER_NAME -- cgit v1.2.1