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
This commit is contained in:
Chandan Kumar 2018-08-02 01:12:14 +05:30
parent 7a908fff2c
commit 3788a62b1f
3 changed files with 8 additions and 8 deletions

View File

@ -14,12 +14,12 @@
import uuid import uuid
from nose.plugins.attrib import attr as tag
import murano_tempest_tests.tests.functional.common.utils as common_utils import murano_tempest_tests.tests.functional.common.utils as common_utils
import murano_tempest_tests.tests.functional.integration.integration_base \ import murano_tempest_tests.tests.functional.integration.integration_base \
as core as core
from tempest.lib import decorators
class MistralTest(core.MistralIntegration): class MistralTest(core.MistralIntegration):
@ -42,7 +42,7 @@ class MistralTest(core.MistralIntegration):
with common_utils.ignored(Exception): with common_utils.ignored(Exception):
cls.purge_uploaded_packages() cls.purge_uploaded_packages()
@tag('all', 'coverage') @decorators.attr(type=['all', 'coverage'])
def test_deploy_package_success(self): def test_deploy_package_success(self):
# Test expects successful deployment and one output: input_1_value. # Test expects successful deployment and one output: input_1_value.

View File

@ -13,12 +13,13 @@
# under the License. # under the License.
import muranoclient.common.exceptions as murano_exceptions import muranoclient.common.exceptions as murano_exceptions
from nose.plugins.attrib import attr as tag
import murano_tempest_tests.tests.functional.common.utils as common_utils import murano_tempest_tests.tests.functional.common.utils as common_utils
import murano_tempest_tests.tests.functional.integration.integration_base \ import murano_tempest_tests.tests.functional.integration.integration_base \
as core as core
from tempest.lib import decorators
class PolicyEnforcementTest(core.CongressIntegration): class PolicyEnforcementTest(core.CongressIntegration):
@ -40,7 +41,7 @@ class PolicyEnforcementTest(core.CongressIntegration):
super(PolicyEnforcementTest, self).tearDown() super(PolicyEnforcementTest, self).tearDown()
self.purge_environments() self.purge_environments()
@tag('all', 'coverage') @decorators.attr(type=['all', 'coverage'])
def test_deploy_policy_fail_key(self): def test_deploy_policy_fail_key(self):
"""Test expects failure due to empty key name. """Test expects failure due to empty key name.
@ -55,7 +56,7 @@ class PolicyEnforcementTest(core.CongressIntegration):
flavor='m1.small'), flavor='m1.small'),
'missing key') 'missing key')
@tag('all', 'coverage') @decorators.attr(type=['all', 'coverage'])
def test_deploy_policy_fail_flavor(self): def test_deploy_policy_fail_flavor(self):
"""Test expects failure due to blacklisted flavor """Test expects failure due to blacklisted flavor
@ -69,7 +70,7 @@ class PolicyEnforcementTest(core.CongressIntegration):
key='test-key'), key='test-key'),
'bad flavor') 'bad flavor')
@tag('all', 'coverage') @decorators.attr(type=['all', 'coverage'])
def test_set_property_policy(self): def test_set_property_policy(self):
"""Tests environment modification by policy """Tests environment modification by policy

View File

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