Fix the mix use of name and uuid in NetworksNegativeTestJSON
In NetworksNegativeTestJSON, tests will try to assert non exist id.
However, some of the tests assign the id with random name while some of
them assign with random uuid. We should keep them consistence and use
random uuid to avoid confusing people.
Change-Id: Ib29506da6ef3dd9798e2424f96aa4918ef48b9fb
Closes-bug: #1489393
diff --git a/tempest/api/network/test_networks_negative.py b/tempest/api/network/test_networks_negative.py
index 5dc1c21..94c3f9a 100644
--- a/tempest/api/network/test_networks_negative.py
+++ b/tempest/api/network/test_networks_negative.py
@@ -26,35 +26,35 @@
@test.attr(type=['negative'])
@test.idempotent_id('9293e937-824d-42d2-8d5b-e985ea67002a')
def test_show_non_existent_network(self):
- non_exist_id = data_utils.rand_name('network')
+ non_exist_id = data_utils.rand_uuid()
self.assertRaises(lib_exc.NotFound, self.client.show_network,
non_exist_id)
@test.attr(type=['negative'])
@test.idempotent_id('d746b40c-5e09-4043-99f7-cba1be8b70df')
def test_show_non_existent_subnet(self):
- non_exist_id = data_utils.rand_name('subnet')
+ non_exist_id = data_utils.rand_uuid()
self.assertRaises(lib_exc.NotFound, self.client.show_subnet,
non_exist_id)
@test.attr(type=['negative'])
@test.idempotent_id('a954861d-cbfd-44e8-b0a9-7fab111f235d')
def test_show_non_existent_port(self):
- non_exist_id = data_utils.rand_name('port')
+ non_exist_id = data_utils.rand_uuid()
self.assertRaises(lib_exc.NotFound, self.client.show_port,
non_exist_id)
@test.attr(type=['negative'])
@test.idempotent_id('98bfe4e3-574e-4012-8b17-b2647063de87')
def test_update_non_existent_network(self):
- non_exist_id = data_utils.rand_name('network')
+ non_exist_id = data_utils.rand_uuid()
self.assertRaises(lib_exc.NotFound, self.client.update_network,
non_exist_id, name="new_name")
@test.attr(type=['negative'])
@test.idempotent_id('03795047-4a94-4120-a0a1-bd376e36fd4e')
def test_delete_non_existent_network(self):
- non_exist_id = data_utils.rand_name('network')
+ non_exist_id = data_utils.rand_uuid()
self.assertRaises(lib_exc.NotFound, self.client.delete_network,
non_exist_id)