Move API response success check to Neutron client
* Move all API response success validation from Neutron API tests to
Neutron base/json/xml clients
Partially Implements blueprint: client-checks-success
Change-Id: I784e9b610f64564861e94d20c6200d1e6915e7f7
diff --git a/tempest/api/network/base_routers.py b/tempest/api/network/base_routers.py
index 1303bcf..f69e6fd 100644
--- a/tempest/api/network/base_routers.py
+++ b/tempest/api/network/base_routers.py
@@ -26,34 +26,29 @@
super(BaseRouterTest, cls).setUpClass()
def _delete_router(self, router_id):
- resp, _ = self.client.delete_router(router_id)
- self.assertEqual(204, resp.status)
+ self.client.delete_router(router_id)
# Asserting that the router is not found in the list
# after deletion
- resp, list_body = self.client.list_routers()
- self.assertEqual('200', resp['status'])
+ _, list_body = self.client.list_routers()
routers_list = list()
for router in list_body['routers']:
routers_list.append(router['id'])
self.assertNotIn(router_id, routers_list)
def _add_router_interface_with_subnet_id(self, router_id, subnet_id):
- resp, interface = self.client.add_router_interface_with_subnet_id(
+ _, interface = self.client.add_router_interface_with_subnet_id(
router_id, subnet_id)
- self.assertEqual('200', resp['status'])
self.addCleanup(self._remove_router_interface_with_subnet_id,
router_id, subnet_id)
self.assertEqual(subnet_id, interface['subnet_id'])
return interface
def _remove_router_interface_with_subnet_id(self, router_id, subnet_id):
- resp, body = self.client.remove_router_interface_with_subnet_id(
+ _, body = self.client.remove_router_interface_with_subnet_id(
router_id, subnet_id)
- self.assertEqual('200', resp['status'])
self.assertEqual(subnet_id, body['subnet_id'])
def _remove_router_interface_with_port_id(self, router_id, port_id):
- resp, body = self.client.remove_router_interface_with_port_id(
- router_id, port_id)
- self.assertEqual('200', resp['status'])
+ _, body = self.client.remove_router_interface_with_port_id(router_id,
+ port_id)
self.assertEqual(port_id, body['port_id'])