summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/tests/unit')
-rw-r--r--openstackclient/tests/unit/network/v2/fakes.py3
-rw-r--r--openstackclient/tests/unit/network/v2/test_router.py8
2 files changed, 7 insertions, 4 deletions
diff --git a/openstackclient/tests/unit/network/v2/fakes.py b/openstackclient/tests/unit/network/v2/fakes.py
index 97d07076..678ab226 100644
--- a/openstackclient/tests/unit/network/v2/fakes.py
+++ b/openstackclient/tests/unit/network/v2/fakes.py
@@ -834,6 +834,9 @@ class FakeRouter(object):
# Set attributes with special mapping in OpenStack SDK.
router.project_id = router_attrs['tenant_id']
+ router.is_admin_state_up = router_attrs['admin_state_up']
+ router.is_distributed = router_attrs['distributed']
+ router.is_ha = router_attrs['ha']
return router
diff --git a/openstackclient/tests/unit/network/v2/test_router.py b/openstackclient/tests/unit/network/v2/test_router.py
index b0409447..8c1d5804 100644
--- a/openstackclient/tests/unit/network/v2/test_router.py
+++ b/openstackclient/tests/unit/network/v2/test_router.py
@@ -459,7 +459,7 @@ class TestListRouter(TestRouter):
columns, data = self.cmd.take_action(parsed_args)
self.network.routers.assert_called_once_with(
- **{'admin_state_up': True}
+ **{'admin_state_up': True, 'is_admin_state_up': True}
)
self.assertEqual(self.columns, columns)
self.assertEqual(self.data, list(data))
@@ -476,7 +476,7 @@ class TestListRouter(TestRouter):
columns, data = self.cmd.take_action(parsed_args)
self.network.routers.assert_called_once_with(
- **{'admin_state_up': False}
+ **{'admin_state_up': False, 'is_admin_state_up': False}
)
self.assertEqual(self.columns, columns)
@@ -494,7 +494,7 @@ class TestListRouter(TestRouter):
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
columns, data = self.cmd.take_action(parsed_args)
- filters = {'tenant_id': project.id}
+ filters = {'tenant_id': project.id, 'project_id': project.id}
self.network.routers.assert_called_once_with(**filters)
self.assertEqual(self.columns, columns)
@@ -514,7 +514,7 @@ class TestListRouter(TestRouter):
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
columns, data = self.cmd.take_action(parsed_args)
- filters = {'tenant_id': project.id}
+ filters = {'tenant_id': project.id, 'project_id': project.id}
self.network.routers.assert_called_once_with(**filters)
self.assertEqual(self.columns, columns)