api-tests: Common way to define required extensions
As some tests require extensions to be enabled on the server, this patch
introduces a new class attribute to the API base class. If any extension
defined in test class is not enabled on the server, then all tests in
the test class will be skipped.
Change-Id: I0629153f973daeb3bef3a6968360cbc2d427f9ad
diff --git a/neutron/tests/tempest/api/test_revisions.py b/neutron/tests/tempest/api/test_revisions.py
index 7a6443c..d94aede 100644
--- a/neutron/tests/tempest/api/test_revisions.py
+++ b/neutron/tests/tempest/api/test_revisions.py
@@ -22,10 +22,7 @@
class TestRevisions(base.BaseAdminNetworkTest, bsg.BaseSecGroupTest):
- @classmethod
- @test.requires_ext(extension="standard-attr-revisions", service="network")
- def skip_checks(cls):
- super(TestRevisions, cls).skip_checks()
+ required_extensions = ['standard-attr-revisions']
@decorators.idempotent_id('4a26a4be-9c53-483c-bc50-b53f1db10ac6')
def test_update_network_bumps_revision(self):