Browse Source

Replace test.attr with decorators.attr

Function 'tempest.test.attr()' has moved to 'tempest.lib.decorators
.attr()' in Pike and will be removed in a future version[1].
This patch replaces the 'tempest.test.attr()' with the 'tempest.lib
.decorators.attr().'

[1] Iaafbb112b6eee458089cc49918359a8a8d0485e2

Change-Id: I52289f8915c05c338b46dce5df7e7d674846916a
changes/53/466153/1
Luong Anh Tuan 4 years ago
parent
commit
4418fe3cfa
  1. 3
      keystone_tempest_plugin/tests/api/identity/v3/test_mapping_rules.py
  2. 7
      keystone_tempest_plugin/tests/api/identity/v3/test_service_providers.py

3
keystone_tempest_plugin/tests/api/identity/v3/test_mapping_rules.py

@ -15,7 +15,6 @@
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest.lib import exceptions as lib_exc
from tempest import test
from keystone_tempest_plugin.tests.api.identity.v3 import fixtures
from keystone_tempest_plugin.tests import base
@ -48,7 +47,7 @@ class MappingRulesTest(base.BaseIdentityTest):
self._assert_mapping_rules_attributes(
mapping, mapping_id, self._MAPPING_REF)
@test.attr(type=['negative'])
@decorators.attr(type=['negative'])
@decorators.idempotent_id('341dac45-ce1f-4f15-afdc-1f9a7d7d7c40')
def test_mapping_rules_create_without_mandatory_attributes_fails(self):
mapping_id = data_utils.rand_uuid_hex()

7
keystone_tempest_plugin/tests/api/identity/v3/test_service_providers.py

@ -15,7 +15,6 @@
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest.lib import exceptions as lib_exc
from tempest import test
from keystone_tempest_plugin.tests.api.identity.v3 import fixtures
from keystone_tempest_plugin.tests import base
@ -73,7 +72,7 @@ class ServiceProvidersTest(base.BaseIdentityTest):
self._assert_service_provider_attributes(sp, sp_id, sp_ref)
@test.attr(type=['negative'])
@decorators.attr(type=['negative'])
@decorators.idempotent_id('d9d7454c-50b7-4966-aedb-b9d520a41409')
def test_service_provider_create_without_mandatory_attributes(self):
sp_id = data_utils.rand_uuid_hex()
@ -82,7 +81,7 @@ class ServiceProvidersTest(base.BaseIdentityTest):
self.sps_client.create_service_provider,
sp_id)
@test.attr(type=['negative'])
@decorators.attr(type=['negative'])
@decorators.idempotent_id('f77ed1c0-c428-44a7-9364-e8e4362c360a')
def test_service_provider_create_with_bad_attributes(self):
sp_id = data_utils.rand_uuid_hex()
@ -165,7 +164,7 @@ class ServiceProvidersTest(base.BaseIdentityTest):
'service_provider']
self.assertFalse(sp_get['enabled'])
@test.attr(type=['negative'])
@decorators.attr(type=['negative'])
@decorators.idempotent_id('91ce1183-1a15-4598-ae5f-85cfa98a1c77')
def test_service_provider_update_with_bad_attributes_fails(self):
sp_id = data_utils.rand_uuid_hex()

Loading…
Cancel
Save