Browse Source

Use tempest.lib.decorators instead of nose

* tempest.lib.decorators provides a better way to handle attrs, let's
  use it instead of using nose from tempest.lib stable api.

Change-Id: Iad64bbaac517b8e1f53ec7046691a79e63f4f74d
Chandan Kumar 8 months ago
parent
commit
3788a62b1f

+ 3
- 3
murano_tempest_tests/tests/functional/integration/test_mistral.py View File

@@ -14,12 +14,12 @@
14 14
 
15 15
 import uuid
16 16
 
17
-from nose.plugins.attrib import attr as tag
18
-
19 17
 import murano_tempest_tests.tests.functional.common.utils as common_utils
20 18
 import murano_tempest_tests.tests.functional.integration.integration_base \
21 19
     as core
22 20
 
21
+from tempest.lib import decorators
22
+
23 23
 
24 24
 class MistralTest(core.MistralIntegration):
25 25
 
@@ -42,7 +42,7 @@ class MistralTest(core.MistralIntegration):
42 42
         with common_utils.ignored(Exception):
43 43
             cls.purge_uploaded_packages()
44 44
 
45
-    @tag('all', 'coverage')
45
+    @decorators.attr(type=['all', 'coverage'])
46 46
     def test_deploy_package_success(self):
47 47
         # Test expects successful deployment and one output: input_1_value.
48 48
 

+ 5
- 4
murano_tempest_tests/tests/functional/integration/test_policy_enf.py View File

@@ -13,12 +13,13 @@
13 13
 # under the License.
14 14
 
15 15
 import muranoclient.common.exceptions as murano_exceptions
16
-from nose.plugins.attrib import attr as tag
17 16
 
18 17
 import murano_tempest_tests.tests.functional.common.utils as common_utils
19 18
 import murano_tempest_tests.tests.functional.integration.integration_base \
20 19
     as core
21 20
 
21
+from tempest.lib import decorators
22
+
22 23
 
23 24
 class PolicyEnforcementTest(core.CongressIntegration):
24 25
 
@@ -40,7 +41,7 @@ class PolicyEnforcementTest(core.CongressIntegration):
40 41
         super(PolicyEnforcementTest, self).tearDown()
41 42
         self.purge_environments()
42 43
 
43
-    @tag('all', 'coverage')
44
+    @decorators.attr(type=['all', 'coverage'])
44 45
     def test_deploy_policy_fail_key(self):
45 46
         """Test expects failure due to empty key name.
46 47
 
@@ -55,7 +56,7 @@ class PolicyEnforcementTest(core.CongressIntegration):
55 56
                                   flavor='m1.small'),
56 57
             'missing key')
57 58
 
58
-    @tag('all', 'coverage')
59
+    @decorators.attr(type=['all', 'coverage'])
59 60
     def test_deploy_policy_fail_flavor(self):
60 61
         """Test expects failure due to blacklisted flavor
61 62
 
@@ -69,7 +70,7 @@ class PolicyEnforcementTest(core.CongressIntegration):
69 70
                                   key='test-key'),
70 71
             'bad flavor')
71 72
 
72
-    @tag('all', 'coverage')
73
+    @decorators.attr(type=['all', 'coverage'])
73 74
     def test_set_property_policy(self):
74 75
         """Tests environment modification by policy
75 76
 

+ 0
- 1
requirements.txt View File

@@ -10,7 +10,6 @@ oslo.utils>=3.33.0 # Apache-2.0
10 10
 testtools>=2.2.0 # MIT
11 11
 tempest>=17.1.0 # Apache-2.0
12 12
 requests>=2.14.2 # Apache-2.0
13
-nose>=1.3.7 # LGPL
14 13
 testresources>=2.0.0 # Apache-2.0/BSD
15 14
 
16 15
 python-keystoneclient>=3.8.0 # Apache-2.0

Loading…
Cancel
Save