Replace usage of deprecated path for attr decorator
The attr decorator was moved to tempest/lib in 16.1.0 . [1] 3b46d27c90aa6289724f4c137a0838c89d116b62 Change-Id: I90a07f153a4360b293bf45cb3f81da869f165cc2
This commit is contained in:
parent
f3950af5f1
commit
176242d3bd
@ -16,8 +16,8 @@
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from cyborg_tempest_plugin.tests.api import base
|
from cyborg_tempest_plugin.tests.api import base
|
||||||
|
from tempest.lib import decorators
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
|
|
||||||
|
|
||||||
class AcceleratorRequestNegativeTest(base.BaseAPITest):
|
class AcceleratorRequestNegativeTest(base.BaseAPITest):
|
||||||
@ -28,7 +28,7 @@ class AcceleratorRequestNegativeTest(base.BaseAPITest):
|
|||||||
|
|
||||||
credentials = ['admin']
|
credentials = ['admin']
|
||||||
|
|
||||||
@test.attr(type=['negative', 'gate'])
|
@decorators.attr(type=['negative', 'gate'])
|
||||||
def test_get_non_existent_accelerator_request(self):
|
def test_get_non_existent_accelerator_request(self):
|
||||||
# get the non-existent accelerator request
|
# get the non-existent accelerator request
|
||||||
non_existent_id = str(uuid.uuid4())
|
non_existent_id = str(uuid.uuid4())
|
||||||
@ -36,7 +36,7 @@ class AcceleratorRequestNegativeTest(base.BaseAPITest):
|
|||||||
self.os_admin.cyborg_client.get_accelerator_request,
|
self.os_admin.cyborg_client.get_accelerator_request,
|
||||||
non_existent_id)
|
non_existent_id)
|
||||||
|
|
||||||
@test.attr(type=['negative', 'gate'])
|
@decorators.attr(type=['negative', 'gate'])
|
||||||
def test_delete_non_existent_accelerator_request(self):
|
def test_delete_non_existent_accelerator_request(self):
|
||||||
# delete the non-existent accelerator request
|
# delete the non-existent accelerator request
|
||||||
non_existent_id = str(uuid.uuid4())
|
non_existent_id = str(uuid.uuid4())
|
||||||
@ -45,7 +45,7 @@ class AcceleratorRequestNegativeTest(base.BaseAPITest):
|
|||||||
self.os_admin.cyborg_client.delete_accelerator_request,
|
self.os_admin.cyborg_client.delete_accelerator_request,
|
||||||
non_existent_id)
|
non_existent_id)
|
||||||
|
|
||||||
@test.attr(type=['negative', 'gate'])
|
@decorators.attr(type=['negative', 'gate'])
|
||||||
def test_create_accelerator_request_device_profile_name_is_null(self):
|
def test_create_accelerator_request_device_profile_name_is_null(self):
|
||||||
# create the accelerator request with device profile name null
|
# create the accelerator request with device profile name null
|
||||||
dp_mame = {"device_profile_name": ""}
|
dp_mame = {"device_profile_name": ""}
|
||||||
@ -54,7 +54,7 @@ class AcceleratorRequestNegativeTest(base.BaseAPITest):
|
|||||||
self.os_admin.cyborg_client.create_accelerator_request,
|
self.os_admin.cyborg_client.create_accelerator_request,
|
||||||
dp_mame)
|
dp_mame)
|
||||||
|
|
||||||
@test.attr(type=['negative', 'gate'])
|
@decorators.attr(type=['negative', 'gate'])
|
||||||
def test_create_accelerator_request_device_profile_name_non_exist(self):
|
def test_create_accelerator_request_device_profile_name_non_exist(self):
|
||||||
# create the accelerator request with device profile name non_exist
|
# create the accelerator request with device profile name non_exist
|
||||||
dp_mame = {"device_profile_name": "fake_dp"}
|
dp_mame = {"device_profile_name": "fake_dp"}
|
||||||
@ -63,7 +63,7 @@ class AcceleratorRequestNegativeTest(base.BaseAPITest):
|
|||||||
self.os_admin.cyborg_client.create_accelerator_request,
|
self.os_admin.cyborg_client.create_accelerator_request,
|
||||||
dp_mame)
|
dp_mame)
|
||||||
|
|
||||||
@test.attr(type=['negative', 'gate'])
|
@decorators.attr(type=['negative', 'gate'])
|
||||||
def test_create_accelerator_request_with_special_characters(self):
|
def test_create_accelerator_request_with_special_characters(self):
|
||||||
# create the accelerator request with special characters
|
# create the accelerator request with special characters
|
||||||
dp_mame = {"device_profile_name": "!@#$%^&*()=-[]"}
|
dp_mame = {"device_profile_name": "!@#$%^&*()=-[]"}
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from cyborg_tempest_plugin.tests.api import base
|
from cyborg_tempest_plugin.tests.api import base
|
||||||
|
from tempest.lib import decorators
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
|
|
||||||
|
|
||||||
class DeployableNegativeTest(base.BaseAPITest):
|
class DeployableNegativeTest(base.BaseAPITest):
|
||||||
@ -28,7 +28,7 @@ class DeployableNegativeTest(base.BaseAPITest):
|
|||||||
|
|
||||||
credentials = ['admin']
|
credentials = ['admin']
|
||||||
|
|
||||||
@test.attr(type=['negative', 'gate'])
|
@decorators.attr(type=['negative', 'gate'])
|
||||||
def test_get_non_existent_deployable(self):
|
def test_get_non_existent_deployable(self):
|
||||||
# get the non-existent deployable
|
# get the non-existent deployable
|
||||||
non_existent_id = str(uuid.uuid4())
|
non_existent_id = str(uuid.uuid4())
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from cyborg_tempest_plugin.tests.api import base
|
from cyborg_tempest_plugin.tests.api import base
|
||||||
|
from tempest.lib import decorators
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
|
|
||||||
|
|
||||||
class DeviceNegativeTest(base.BaseAPITest):
|
class DeviceNegativeTest(base.BaseAPITest):
|
||||||
@ -28,7 +28,7 @@ class DeviceNegativeTest(base.BaseAPITest):
|
|||||||
|
|
||||||
credentials = ['admin']
|
credentials = ['admin']
|
||||||
|
|
||||||
@test.attr(type=['negative', 'gate'])
|
@decorators.attr(type=['negative', 'gate'])
|
||||||
def test_get_non_existent_device(self):
|
def test_get_non_existent_device(self):
|
||||||
# get the non-existent device
|
# get the non-existent device
|
||||||
non_existent_id = str(uuid.uuid4())
|
non_existent_id = str(uuid.uuid4())
|
||||||
|
@ -18,8 +18,8 @@ import string
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from cyborg_tempest_plugin.tests.api import base
|
from cyborg_tempest_plugin.tests.api import base
|
||||||
|
from tempest.lib import decorators
|
||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from tempest import test
|
|
||||||
|
|
||||||
|
|
||||||
class DeviceProfileNegativeTest(base.BaseAPITest):
|
class DeviceProfileNegativeTest(base.BaseAPITest):
|
||||||
@ -30,7 +30,7 @@ class DeviceProfileNegativeTest(base.BaseAPITest):
|
|||||||
|
|
||||||
credentials = ['admin']
|
credentials = ['admin']
|
||||||
|
|
||||||
@test.attr(type=['negative', 'gate'])
|
@decorators.attr(type=['negative', 'gate'])
|
||||||
def test_get_non_existent_device_profile(self):
|
def test_get_non_existent_device_profile(self):
|
||||||
# get the non-existent device_profile
|
# get the non-existent device_profile
|
||||||
non_existent_id = str(uuid.uuid4())
|
non_existent_id = str(uuid.uuid4())
|
||||||
@ -38,7 +38,7 @@ class DeviceProfileNegativeTest(base.BaseAPITest):
|
|||||||
self.os_admin.cyborg_client.get_device_profile,
|
self.os_admin.cyborg_client.get_device_profile,
|
||||||
non_existent_id)
|
non_existent_id)
|
||||||
|
|
||||||
@test.attr(type=['negative', 'gate'])
|
@decorators.attr(type=['negative', 'gate'])
|
||||||
def test_delete_non_existent_device_profile(self):
|
def test_delete_non_existent_device_profile(self):
|
||||||
# delete the non-existent device_profile
|
# delete the non-existent device_profile
|
||||||
non_existent_id = str(uuid.uuid4())
|
non_existent_id = str(uuid.uuid4())
|
||||||
@ -47,7 +47,7 @@ class DeviceProfileNegativeTest(base.BaseAPITest):
|
|||||||
self.os_admin.cyborg_client.delete_device_profile_by_uuid,
|
self.os_admin.cyborg_client.delete_device_profile_by_uuid,
|
||||||
non_existent_id)
|
non_existent_id)
|
||||||
|
|
||||||
@test.attr(type=['negative', 'gate'])
|
@decorators.attr(type=['negative', 'gate'])
|
||||||
def test_delete_multiple_non_existent_device_profile(self):
|
def test_delete_multiple_non_existent_device_profile(self):
|
||||||
# delete multiple non_existent device_profile
|
# delete multiple non_existent device_profile
|
||||||
self.assertRaises(
|
self.assertRaises(
|
||||||
@ -56,7 +56,7 @@ class DeviceProfileNegativeTest(base.BaseAPITest):
|
|||||||
delete_multiple_device_profile_by_names,
|
delete_multiple_device_profile_by_names,
|
||||||
'fake_device_name1', 'fake_device_name2')
|
'fake_device_name1', 'fake_device_name2')
|
||||||
|
|
||||||
@test.attr(type=['negative', 'gate'])
|
@decorators.attr(type=['negative', 'gate'])
|
||||||
def test_delete_device_profile_name_null(self):
|
def test_delete_device_profile_name_null(self):
|
||||||
# delete the device_profile name is null
|
# delete the device_profile name is null
|
||||||
name = ""
|
name = ""
|
||||||
@ -65,7 +65,7 @@ class DeviceProfileNegativeTest(base.BaseAPITest):
|
|||||||
self.os_admin.cyborg_client.delete_device_profile,
|
self.os_admin.cyborg_client.delete_device_profile,
|
||||||
name)
|
name)
|
||||||
|
|
||||||
@test.attr(type=['negative', 'gate'])
|
@decorators.attr(type=['negative', 'gate'])
|
||||||
def test_create_device_profile_server_fault(self):
|
def test_create_device_profile_server_fault(self):
|
||||||
# create device profile using an existing dp uuid
|
# create device profile using an existing dp uuid
|
||||||
dp = [{
|
dp = [{
|
||||||
@ -89,7 +89,7 @@ class DeviceProfileNegativeTest(base.BaseAPITest):
|
|||||||
self.os_admin.cyborg_client.create_device_profile,
|
self.os_admin.cyborg_client.create_device_profile,
|
||||||
dp)
|
dp)
|
||||||
|
|
||||||
@test.attr(type=['negative', 'gate'])
|
@decorators.attr(type=['negative', 'gate'])
|
||||||
def test_create_device_profile_conflict(self):
|
def test_create_device_profile_conflict(self):
|
||||||
# create device profile name same
|
# create device profile name same
|
||||||
dp = [{
|
dp = [{
|
||||||
@ -112,7 +112,7 @@ class DeviceProfileNegativeTest(base.BaseAPITest):
|
|||||||
self.os_admin.cyborg_client.create_device_profile,
|
self.os_admin.cyborg_client.create_device_profile,
|
||||||
dp)
|
dp)
|
||||||
|
|
||||||
@test.attr(type=['negative', 'gate'])
|
@decorators.attr(type=['negative', 'gate'])
|
||||||
def test_create_device_profile_name_is_null(self):
|
def test_create_device_profile_name_is_null(self):
|
||||||
# create device profile name is null
|
# create device profile name is null
|
||||||
dp = [{
|
dp = [{
|
||||||
@ -130,7 +130,7 @@ class DeviceProfileNegativeTest(base.BaseAPITest):
|
|||||||
self.os_admin.cyborg_client.create_device_profile,
|
self.os_admin.cyborg_client.create_device_profile,
|
||||||
dp)
|
dp)
|
||||||
|
|
||||||
@test.attr(type=['negative', 'gate'])
|
@decorators.attr(type=['negative', 'gate'])
|
||||||
def test_create_device_profile_name_to_long(self):
|
def test_create_device_profile_name_to_long(self):
|
||||||
# create device profile name character is too long
|
# create device profile name character is too long
|
||||||
name_value = "".join(random.sample(
|
name_value = "".join(random.sample(
|
||||||
|
Loading…
Reference in New Issue
Block a user