summaryrefslogtreecommitdiff
path: root/tests/v1_1/test_shell.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-01-29 20:04:35 +0000
committerGerrit Code Review <review@openstack.org>2013-01-29 20:04:35 +0000
commitc70144aced21fa705755d0c7724e2599dd7aeb26 (patch)
tree20895a3d453bcb315fbea96cd6cf0a0be2e7600b /tests/v1_1/test_shell.py
parentfb3a32a9ec5ed6b29f45c91b1e59050425ee2444 (diff)
parent168636e744012f264310897603eb4e3dde6d1df8 (diff)
downloadpython-novaclient-c70144aced21fa705755d0c7724e2599dd7aeb26.tar.gz
Merge "Check tenant_id's format in "nova quota-update""
Diffstat (limited to 'tests/v1_1/test_shell.py')
-rw-r--r--tests/v1_1/test_shell.py19
1 files changed, 15 insertions, 4 deletions
diff --git a/tests/v1_1/test_shell.py b/tests/v1_1/test_shell.py
index 0a36c200..0d3395ca 100644
--- a/tests/v1_1/test_shell.py
+++ b/tests/v1_1/test_shell.py
@@ -716,16 +716,27 @@ class ShellTest(utils.TestCase):
self.assert_called('GET', '/os-quota-sets/test/defaults')
def test_quota_update(self):
- self.run_command('quota-update test --instances=5')
- self.assert_called('PUT', '/os-quota-sets/test')
+ self.run_command(
+ 'quota-update 97f4c221bff44578b0300df4ef119353 \
+ --instances=5')
+ self.assert_called('PUT',
+ '/os-quota-sets/97f4c221bff44578b0300df4ef119353')
+
+ def test_quota_update_error(self):
+ self.assertRaises(exceptions.CommandError,
+ self.run_command,
+ 'quota-update 7f4c221-bff4-4578-b030-0df4ef119353 \
+ --instances=5')
def test_quota_class_show(self):
self.run_command('quota-class-show test')
self.assert_called('GET', '/os-quota-class-sets/test')
def test_quota_class_update(self):
- self.run_command('quota-class-update test --instances=5')
- self.assert_called('PUT', '/os-quota-class-sets/test')
+ self.run_command('quota-class-update 97f4c221bff44578b0300df4ef119353 \
+ --instances=5')
+ self.assert_called('PUT',
+ '/os-quota-class-sets/97f4c221bff44578b0300df4ef119353')
def test_network_list(self):
self.run_command('network-list')