summaryrefslogtreecommitdiff
path: root/openstackclient/tests/functional
diff options
context:
space:
mode:
authorRui Chen <chenrui.momo@gmail.com>2016-07-11 09:55:22 +0800
committerRui Chen <chenrui.momo@gmail.com>2016-09-13 17:23:22 +0800
commit6f326acd260d035cb024f0c5e3ef2237277d8b37 (patch)
tree7bd0696e6069eee7f3be06338c0d04a02469ee26 /openstackclient/tests/functional
parent320ed017749f6a7ffba8d11a1d415fd869bfecb0 (diff)
downloadpython-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/functional')
-rw-r--r--openstackclient/tests/functional/common/test_quota.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/openstackclient/tests/functional/common/test_quota.py b/openstackclient/tests/functional/common/test_quota.py
index fd45be38..9687cdb0 100644
--- a/openstackclient/tests/functional/common/test_quota.py
+++ b/openstackclient/tests/functional/common/test_quota.py
@@ -17,6 +17,7 @@ class QuotaTests(base.TestCase):
"""Functional tests for quota. """
# Test quota information for compute, network and volume.
EXPECTED_FIELDS = ['instances', 'networks', 'volumes']
+ EXPECTED_CLASS_FIELDS = ['instances', 'volumes']
PROJECT_NAME = None
@classmethod
@@ -40,3 +41,13 @@ class QuotaTests(base.TestCase):
raw_output = self.openstack('quota show')
for expected_field in self.EXPECTED_FIELDS:
self.assertIn(expected_field, raw_output)
+
+ def test_quota_show_with_default_option(self):
+ raw_output = self.openstack('quota show --default')
+ for expected_field in self.EXPECTED_FIELDS:
+ self.assertIn(expected_field, raw_output)
+
+ def test_quota_show_with_class_option(self):
+ raw_output = self.openstack('quota show --class')
+ for expected_field in self.EXPECTED_CLASS_FIELDS:
+ self.assertIn(expected_field, raw_output)