Tempest: Fix DeprecationWarning for tempest.test.attr()

tempest.test.attr() has moved to tempest.lib.decorators.attr()
in Pike[1].
This requires I451645778b39bc2ff3aeb51489caef5c273fe9ce.

[1] Iaafbb112b6eee458089cc49918359a8a8d0485e2

Change-Id: I6ac67698620bb0aae803d429b71efb7e6736ee4f
This commit is contained in:
fumihiko kakuma 2017-07-14 09:16:36 +09:00
parent d8c2c9e562
commit 2fae69054e
1 changed files with 4 additions and 5 deletions

View File

@ -16,7 +16,6 @@ import netaddr
from tempest.lib import decorators
from tempest.lib import exceptions as lib_exc
from tempest import test
from neutron_dynamic_routing.tests.tempest.api import test_bgp_speaker_extensions as test_base # noqa
@ -25,28 +24,28 @@ class BgpSpeakerTestJSONNegative(test_base.BgpSpeakerTestJSONBase):
"""Negative test cases asserting proper behavior of BGP API extension"""
@test.attr(type=['negative', 'smoke'])
@decorators.attr(type=['negative', 'smoke'])
@decorators.idempotent_id('75e9ee2f-6efd-4320-bff7-ae24741c8b06')
def test_create_bgp_speaker_illegal_local_asn(self):
self.assertRaises(lib_exc.BadRequest,
self.create_bgp_speaker,
local_as='65537')
@test.attr(type=['negative', 'smoke'])
@decorators.attr(type=['negative', 'smoke'])
@decorators.idempotent_id('6742ec2e-382a-4453-8791-13a19b47cd13')
def test_create_bgp_speaker_non_admin(self):
self.assertRaises(lib_exc.Forbidden,
self.bgp_client.create_bgp_speaker,
{'bgp_speaker': self.default_bgp_speaker_args})
@test.attr(type=['negative', 'smoke'])
@decorators.attr(type=['negative', 'smoke'])
@decorators.idempotent_id('33f7aaf0-9786-478b-b2d1-a51086a50eb4')
def test_create_bgp_peer_non_admin(self):
self.assertRaises(lib_exc.Forbidden,
self.bgp_client.create_bgp_peer,
{'bgp_peer': self.default_bgp_peer_args})
@test.attr(type=['negative', 'smoke'])
@decorators.attr(type=['negative', 'smoke'])
@decorators.idempotent_id('39435932-0266-4358-899b-0e9b1e53c3e9')
def test_update_bgp_speaker_local_asn(self):
bgp_speaker = self.create_bgp_speaker(**self.default_bgp_speaker_args)