summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/common
diff options
context:
space:
mode:
authorStephen Finucane <sfinucan@redhat.com>2022-09-23 17:03:53 +0100
committerStephen Finucane <sfinucan@redhat.com>2022-09-30 12:33:29 +0100
commit47e667e71d997ad4a7b0dd86bf462f746c964b54 (patch)
tree4801a43c3e3a02ae50595dbd9044ebcacdbc9d1f /openstackclient/tests/unit/common
parent44443f78561ce4f23d202a42de4a4ceac2ffa097 (diff)
downloadpython-openstackclient-47e667e71d997ad4a7b0dd86bf462f746c964b54.tar.gz
quota: Simplify logic used to list, show quotas
This is prep work for some changes we're introducing in a later change. Change-Id: I27a59bc1d57e6815fb166fb99ea2af88f08b68a9 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Diffstat (limited to 'openstackclient/tests/unit/common')
-rw-r--r--openstackclient/tests/unit/common/test_quota.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/openstackclient/tests/unit/common/test_quota.py b/openstackclient/tests/unit/common/test_quota.py
index 58007208..663b62ea 100644
--- a/openstackclient/tests/unit/common/test_quota.py
+++ b/openstackclient/tests/unit/common/test_quota.py
@@ -1166,29 +1166,6 @@ class TestQuotaShow(TestQuota):
)
self.assertNotCalled(self.network.get_quota_default)
- def test_network_quota_show_remove_empty(self):
- arglist = [
- self.projects[0].name,
- ]
- verifylist = [
- ('project', self.projects[0].name),
- ]
- parsed_args = self.check_parser(self.cmd, arglist, verifylist)
-
- # First check that all regular values are returned
- result = self.cmd.get_network_quota(parsed_args)
- self.assertEqual(len(network_fakes.QUOTA), len(result))
-
- # set 1 of the values to None, and verify it is not returned
- orig_get_quota = self.network.get_quota
- network_quotas = copy.copy(network_fakes.QUOTA)
- network_quotas['healthmonitor'] = None
- self.network.get_quota = mock.Mock(return_value=network_quotas)
- result = self.cmd.get_network_quota(parsed_args)
- self.assertEqual(len(network_fakes.QUOTA) - 1, len(result))
- # Go back to default mock
- self.network.get_quota = orig_get_quota
-
class TestQuotaDelete(TestQuota):
"""Test cases for quota delete command"""