Skip to content

Commit

Permalink
Use addClassResourceCleanup in account service test
Browse files Browse the repository at this point in the history
This patch is to use addClassResourceCleanup for the
account service test.

Change-Id: I7094879126a83eabb5a6e1fafe3ce0ccfa8b4e7c
  • Loading branch information
yuanying committed Dec 15, 2017
1 parent 3f697b3 commit 19355c9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tempest/api/object_storage/test_account_services.py
Expand Up @@ -44,14 +44,13 @@ def resource_setup(cls):
for i in range(ord('a'), ord('f') + 1):
name = data_utils.rand_name(name='%s-' % six.int2byte(i))
cls.container_client.update_container(name)
cls.addClassResourceCleanup(base.delete_containers,
[name],
cls.container_client,
cls.object_client)
cls.containers.append(name)
cls.containers_count = len(cls.containers)

@classmethod
def resource_cleanup(cls):
cls.delete_containers()
super(AccountTest, cls).resource_cleanup()

@decorators.attr(type='smoke')
@decorators.idempotent_id('3499406a-ae53-4f8c-b43a-133d4dc6fe3f')
def test_list_containers(self):
Expand Down

0 comments on commit 19355c9

Please sign in to comment.