summaryrefslogtreecommitdiff
path: root/openstackclient/tests
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-11-08 19:47:49 +0000
committerGerrit Code Review <review@openstack.org>2016-11-08 19:47:49 +0000
commit6bba1f000805ee78d92aa37a69b91b51ad954e54 (patch)
tree9482f7c84fd9af77628c32ac71a7077d56fbe2a1 /openstackclient/tests
parentc27da0564cdccb9c073cdacec76e488035a6197f (diff)
parentd6cc50f0daac71fbe2a18059be94f6d01a26d78d (diff)
downloadpython-openstackclient-6bba1f000805ee78d92aa37a69b91b51ad954e54.tar.gz
Merge "SDK Refactor: Prepare subnet pool commands"
Diffstat (limited to 'openstackclient/tests')
-rw-r--r--openstackclient/tests/unit/network/v2/fakes.py5
-rw-r--r--openstackclient/tests/unit/network/v2/test_subnet_pool.py8
2 files changed, 9 insertions, 4 deletions
diff --git a/openstackclient/tests/unit/network/v2/fakes.py b/openstackclient/tests/unit/network/v2/fakes.py
index 90dd0892..f1c72461 100644
--- a/openstackclient/tests/unit/network/v2/fakes.py
+++ b/openstackclient/tests/unit/network/v2/fakes.py
@@ -1217,6 +1217,11 @@ class FakeSubnetPool(object):
)
# Set attributes with special mapping in OpenStack SDK.
+ subnet_pool.default_prefix_length = \
+ subnet_pool_attrs['default_prefixlen']
+ subnet_pool.is_shared = subnet_pool_attrs['shared']
+ subnet_pool.maximum_prefix_length = subnet_pool_attrs['max_prefixlen']
+ subnet_pool.minimum_prefix_length = subnet_pool_attrs['min_prefixlen']
subnet_pool.project_id = subnet_pool_attrs['tenant_id']
return subnet_pool
diff --git a/openstackclient/tests/unit/network/v2/test_subnet_pool.py b/openstackclient/tests/unit/network/v2/test_subnet_pool.py
index fa6ffff3..f12537e7 100644
--- a/openstackclient/tests/unit/network/v2/test_subnet_pool.py
+++ b/openstackclient/tests/unit/network/v2/test_subnet_pool.py
@@ -435,7 +435,7 @@ class TestListSubnetPool(TestSubnetPool):
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
columns, data = self.cmd.take_action(parsed_args)
- filters = {'shared': False}
+ filters = {'shared': False, 'is_shared': False}
self.network.subnet_pools.assert_called_once_with(**filters)
self.assertEqual(self.columns, columns)
@@ -451,7 +451,7 @@ class TestListSubnetPool(TestSubnetPool):
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
columns, data = self.cmd.take_action(parsed_args)
- filters = {'shared': True}
+ filters = {'shared': True, 'is_shared': True}
self.network.subnet_pools.assert_called_once_with(**filters)
self.assertEqual(self.columns, columns)
@@ -501,7 +501,7 @@ class TestListSubnetPool(TestSubnetPool):
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.subnet_pools.assert_called_once_with(**filters)
self.assertEqual(self.columns, columns)
@@ -521,7 +521,7 @@ class TestListSubnetPool(TestSubnetPool):
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.subnet_pools.assert_called_once_with(**filters)
self.assertEqual(self.columns, columns)