Skip to content

Commit 75d3130

Browse files
committed
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
1 parent aa7e58c commit 75d3130

3 files changed

Lines changed: 11 additions & 9 deletions

File tree

‎functional/tests/identity/v2/test_identity.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
BASIC_LIST_HEADERS = ['ID', 'Name']
1717

1818

19-
class IdentityV2Tests(test.TestCase):
20-
"""Functional tests for Identity V2 commands. """
19+
class IdentityTests(test.TestCase):
20+
"""Functional tests for Identity commands. """
2121

2222
USER_FIELDS = ['email', 'enabled', 'id', 'name', 'project_id', 'username']
2323
PROJECT_FIELDS = ['enabled', 'id', 'name', 'description']

‎functional/tests/identity/v3/test_identity.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
BASIC_LIST_HEADERS = ['ID', 'Name']
2020

2121

22-
class IdentityV3Tests(test.TestCase):
23-
"""Functional tests for Identity V3 commands. """
22+
class IdentityTests(test.TestCase):
23+
"""Functional tests for Identity commands. """
2424

2525
DOMAIN_FIELDS = ['description', 'enabled', 'id', 'name', 'links']
2626
GROUP_FIELDS = ['description', 'domain_id', 'id', 'name', 'links']
@@ -37,7 +37,7 @@ def _create_dummy_domain(self):
3737
return name
3838

3939
def setUp(self):
40-
super(IdentityV3Tests, self).setUp()
40+
super(IdentityTests, self).setUp()
4141
auth_url = os.environ.get('OS_AUTH_URL')
4242
auth_url = auth_url.replace('v2.0', 'v3')
4343
os.environ['OS_AUTH_URL'] = auth_url

‎functional/tests/object/v1/test_object.py‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,17 @@
2020
OBJECT_FIELDS = ['object', 'container', 'etag']
2121

2222

23-
class ObjectV1Tests(test.TestCase):
24-
"""Functional tests for Object V1 commands. """
23+
class ObjectTests(test.TestCase):
24+
"""Functional tests for Object commands. """
2525

2626
CONTAINER_NAME = uuid.uuid4().hex
2727
OBJECT_NAME = uuid.uuid4().hex
28+
TMP_FILE = 'tmp.txt'
2829

2930
def setUp(self):
30-
super(ObjectV1Tests, self).setUp()
31+
super(ObjectTests, self).setUp()
3132
self.addCleanup(os.remove, self.OBJECT_NAME)
33+
self.addCleanup(os.remove, self.TMP_FILE)
3234
with open(self.OBJECT_NAME, 'w') as f:
3335
f.write('test content')
3436

@@ -61,7 +63,7 @@ def test_object(self):
6163
# TODO(stevemar): Assert returned fields
6264

6365
self.openstack('object save ' + self.CONTAINER_NAME
64-
+ ' ' + self.OBJECT_NAME + ' --file tmp.txt')
66+
+ ' ' + self.OBJECT_NAME + ' --file ' + self.TMP_FILE)
6567
# TODO(stevemar): Assert returned fields
6668

6769
self.openstack('object show ' + self.CONTAINER_NAME

0 commit comments

Comments
 (0)