Clean up namespace class resources via addClassResourceCleanup
This patch cleans up namespace class resources via addClassResourceCleanup.
Change-Id: I4507b56856f20bfc1adbfdaafc92a9ff66ff6f4b
diff --git a/patrole_tempest_plugin/tests/api/image/test_image_namespace_tags_rbac.py b/patrole_tempest_plugin/tests/api/image/test_image_namespace_tags_rbac.py
index 8e2bc49..ecf2ec2 100644
--- a/patrole_tempest_plugin/tests/api/image/test_image_namespace_tags_rbac.py
+++ b/patrole_tempest_plugin/tests/api/image/test_image_namespace_tags_rbac.py
@@ -39,11 +39,9 @@
cls.namespace = cls.namespaces_client.create_namespace(
namespace=data_utils.rand_name(
cls.__name__ + '-namespace'))['namespace']
-
- @classmethod
- def resource_cleanup(cls):
- cls.namespaces_client.delete_namespace(cls.namespace)
- super(NamespaceTagsRbacTest, cls).resource_cleanup()
+ cls.addClassResourceCleanup(
+ cls.namespaces_client.delete_namespace,
+ cls.namespace)
def _create_namespace_tag(self, multiple=False):
tag_count = 2 if multiple else 1