Negative tests added for network
Here some negative tests added for network:- *For a non existent network id *For a non existent subnet id Change-Id: I81a72853e4b9cfde63e5dbea37e743e7a90ca00c
This commit is contained in:
parent
1702f21983
commit
6656f58726
|
@ -116,3 +116,15 @@ class NetworksTest(base.BaseNetworkTest):
|
|||
subnets = body['subnets']
|
||||
found = any(n for n in subnets if n['id'] == self.subnet['id'])
|
||||
self.assertTrue(found)
|
||||
|
||||
@attr(type=['negative', 'gate'])
|
||||
def test_show_non_existent_network(self):
|
||||
non_exist_id = rand_name('network')
|
||||
self.assertRaises(exceptions.NotFound, self.client.show_network,
|
||||
non_exist_id)
|
||||
|
||||
@attr(type=['negative', 'gate'])
|
||||
def test_show_non_existent_subnet(self):
|
||||
non_exist_id = rand_name('subnet')
|
||||
self.assertRaises(exceptions.NotFound, self.client.show_subnet,
|
||||
non_exist_id)
|
||||
|
|
Loading…
Reference in New Issue