summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/network
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-04-05 17:00:49 +0000
committerGerrit Code Review <review@openstack.org>2017-04-05 17:00:49 +0000
commit27f96a3a7a5515ff621300a917872b5ec62f41de (patch)
tree51cd6f8e740f2495ddc2899a230a475c8d28e02f /openstackclient/tests/unit/network
parent65b61d3a9c08a43cc0746ac17fec00682a720913 (diff)
parent53ba05325ad5e580e62addb7f4b405b96ad01d80 (diff)
downloadpython-openstackclient-27f96a3a7a5515ff621300a917872b5ec62f41de.tar.gz
Merge "Enable to create legacy router"
Diffstat (limited to 'openstackclient/tests/unit/network')
-rw-r--r--openstackclient/tests/unit/network/v2/test_router.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/openstackclient/tests/unit/network/v2/test_router.py b/openstackclient/tests/unit/network/v2/test_router.py
index b837afd1..a4f91997 100644
--- a/openstackclient/tests/unit/network/v2/test_router.py
+++ b/openstackclient/tests/unit/network/v2/test_router.py
@@ -181,16 +181,17 @@ class TestCreateRouter(TestRouter):
self.assertEqual(self.columns, columns)
self.assertEqual(self.data, data)
- def test_create_with_ha_option(self):
+ def _test_create_with_ha_options(self, option, ha):
arglist = [
- '--ha',
+ option,
self.new_router.name,
]
verifylist = [
('name', self.new_router.name),
('enable', True),
('distributed', False),
- ('ha', True),
+ ('ha', ha),
+ ('no_ha', not ha),
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
@@ -199,11 +200,17 @@ class TestCreateRouter(TestRouter):
self.network.create_router.assert_called_once_with(**{
'admin_state_up': True,
'name': self.new_router.name,
- 'ha': True,
+ 'ha': ha,
})
self.assertEqual(self.columns, columns)
self.assertEqual(self.data, data)
+ def test_create_with_ha_option(self):
+ self._test_create_with_ha_options('--ha', True)
+
+ def test_create_with_no_ha_option(self):
+ self._test_create_with_ha_options('--no-ha', False)
+
def test_create_with_AZ_hints(self):
arglist = [
self.new_router.name,