diff options
| author | Rui Chen <chenrui.momo@gmail.com> | 2016-07-11 09:55:22 +0800 |
|---|---|---|
| committer | Rui Chen <chenrui.momo@gmail.com> | 2016-09-13 17:23:22 +0800 |
| commit | 6f326acd260d035cb024f0c5e3ef2237277d8b37 (patch) | |
| tree | 7bd0696e6069eee7f3be06338c0d04a02469ee26 /openstackclient/tests/unit | |
| parent | 320ed017749f6a7ffba8d11a1d415fd869bfecb0 (diff) | |
| download | python-openstackclient-6f326acd260d035cb024f0c5e3ef2237277d8b37.tar.gz | |
Support fetching network project default quota
Neutron server and openstacksdk had supported to fetch
network project default quota, this patch add the CLI
support in openstackclient.
Change-Id: If0ef74c268c41a866c62156da0603a40ae4e6e31
Closes-Bug: #1204956
Depends-On: I6a4e2a146351dd1e7d652442511f1ef2c279da42
Diffstat (limited to 'openstackclient/tests/unit')
| -rw-r--r-- | openstackclient/tests/unit/common/test_quota.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/openstackclient/tests/unit/common/test_quota.py b/openstackclient/tests/unit/common/test_quota.py index cbe4cb80..ac03cb60 100644 --- a/openstackclient/tests/unit/common/test_quota.py +++ b/openstackclient/tests/unit/common/test_quota.py @@ -383,6 +383,8 @@ class TestQuotaShow(TestQuota): ) self.network = self.app.client_manager.network self.network.get_quota = mock.Mock(return_value=network_fakes.QUOTA) + self.network.get_quota_default = mock.Mock( + return_value=network_fakes.QUOTA) self.cmd = quota.ShowQuota(self.app, None) @@ -403,6 +405,7 @@ class TestQuotaShow(TestQuota): identity_fakes.project_id) self.network.get_quota.assert_called_once_with( identity_fakes.project_id) + self.assertNotCalled(self.network.get_quota_default) def test_quota_show_with_default(self): arglist = [ @@ -422,6 +425,9 @@ class TestQuotaShow(TestQuota): identity_fakes.project_id) self.volume_quotas_mock.defaults.assert_called_once_with( identity_fakes.project_id) + self.network.get_quota_default.assert_called_once_with( + identity_fakes.project_id) + self.assertNotCalled(self.network.get_quota) def test_quota_show_with_class(self): arglist = [ @@ -441,6 +447,8 @@ class TestQuotaShow(TestQuota): identity_fakes.project_id) self.volume_quotas_class_mock.get.assert_called_once_with( identity_fakes.project_id) + self.assertNotCalled(self.network.get_quota) + self.assertNotCalled(self.network.get_quota_default) def test_quota_show_no_project(self): parsed_args = self.check_parser(self.cmd, [], []) @@ -452,3 +460,4 @@ class TestQuotaShow(TestQuota): identity_fakes.project_id) self.network.get_quota.assert_called_once_with( identity_fakes.project_id) + self.assertNotCalled(self.network.get_quota_default) |
