From 19355c9607bd799718c11c6b9ada430a02b784e2 Mon Sep 17 00:00:00 2001 From: "OTSUKA, Yuanying" Date: Fri, 15 Dec 2017 16:21:46 +0900 Subject: [PATCH] Use addClassResourceCleanup in account service test This patch is to use addClassResourceCleanup for the account service test. Change-Id: I7094879126a83eabb5a6e1fafe3ce0ccfa8b4e7c --- tempest/api/object_storage/test_account_services.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tempest/api/object_storage/test_account_services.py b/tempest/api/object_storage/test_account_services.py index d7c85a2414..3bbab11cbb 100644 --- a/tempest/api/object_storage/test_account_services.py +++ b/tempest/api/object_storage/test_account_services.py @@ -44,14 +44,13 @@ class AccountTest(base.BaseObjectTest): 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):