def test_update_quota_noargs(self): resource = 'quota' cmd = test_quota.UpdateQuota(test_cli20.MyApp(sys.stdout), None) args = [self.test_id] self.assertRaises(exceptions.CommandError, self._test_update_resource, resource, cmd, self.test_id, args=args, extrafields=None)
def test_update_quota_positional(self): resource = 'quota' cmd = test_quota.UpdateQuota( test_cli20.MyApp(sys.stdout), None) args = [self.test_id, '--network', 'test'] self.assertRaises( exceptions.NeutronClientException, self._test_update_resource, resource, cmd, self.test_id, args=args, extrafields={'network': 'new'})
def test_update_quota(self): resource = 'quota' cmd = test_quota.UpdateQuota( test_cli20.MyApp(sys.stdout), None) args = ['--tenant-id', self.test_id, '--network', 'test'] self.assertRaises( exceptions.CommandError, self._test_update_resource, resource, cmd, self.test_id, args=args, extrafields={'network': 'new'})