Use correct routers_client in _delete_router
client should be used instead of self.routers_client.
And since I am here, I'd like to do a very small code optimization.
Change-Id: I1e34e7b97597a552b6232ded45f704bbe7115165
diff --git a/tempest/api/network/base_routers.py b/tempest/api/network/base_routers.py
index 5fb5232..f6fd871 100644
--- a/tempest/api/network/base_routers.py
+++ b/tempest/api/network/base_routers.py
@@ -38,10 +38,8 @@
client.delete_router(router_id)
# Asserting that the router is not found in the list
# after deletion
- list_body = self.routers_client.list_routers()
- routers_list = list()
- for router in list_body['routers']:
- routers_list.append(router['id'])
+ list_body = client.list_routers()
+ routers_list = [router['id'] for router in list_body['routers']]
self.assertNotIn(router_id, routers_list)
def _add_router_interface_with_subnet_id(self, router_id, subnet_id):