Clean up image resource types class resources via addClassResourceCleanup
This patch cleans up test_image_resource_types_rbac class resources
via addClassResourceCleanup.
Change-Id: I99298fac3060c4affe5f04e8068b70c047aa39eb
diff --git a/patrole_tempest_plugin/tests/api/image/test_image_resource_types_rbac.py b/patrole_tempest_plugin/tests/api/image/test_image_resource_types_rbac.py
index 456e10b..701e345 100644
--- a/patrole_tempest_plugin/tests/api/image/test_image_resource_types_rbac.py
+++ b/patrole_tempest_plugin/tests/api/image/test_image_resource_types_rbac.py
@@ -31,13 +31,9 @@
cls.namespaces_client.create_namespace(
namespace=cls.namespace_name,
protected=False)
-
- @classmethod
- def resource_cleanup(cls):
- test_utils.call_and_ignore_notfound_exc(
- cls.namespaces_client.delete_namespace,
- cls.namespace_name)
- super(ImageResourceTypesRbacTest, cls).resource_cleanup()
+ cls.addClassResourceCleanup(
+ test_utils.call_and_ignore_notfound_exc,
+ cls.namespaces_client.delete_namespace, cls.namespace_name)
@rbac_rule_validation.action(service="glance",
rule="list_metadef_resource_types")