Bump hacking
hacking 3.0.x is too old. Change-Id: I1fa5bf30150c4d6fa38d4103f652fb6b82963cf3
This commit is contained in:
parent
64f58141bb
commit
5a2c000557
@ -251,8 +251,8 @@ def get_service_type(f):
|
||||
return getattr(f, 'service_type', None)
|
||||
|
||||
|
||||
def pretty_choice_list(l):
|
||||
return ', '.join("'%s'" % i for i in l)
|
||||
def pretty_choice_list(choices):
|
||||
return ', '.join("'%s'" % choice for choice in choices)
|
||||
|
||||
|
||||
def exit(msg=''):
|
||||
|
@ -98,7 +98,7 @@ class BaseTestCase(base.ClientTestBase):
|
||||
res["deleted"] = False
|
||||
if "client" not in res:
|
||||
res["client"] = cls.get_cleanup_client()
|
||||
if not(res["deleted"]):
|
||||
if not res["deleted"]:
|
||||
res_id = res["id"]
|
||||
client = res["client"]
|
||||
deletion_params = res.get("deletion_params")
|
||||
|
@ -422,7 +422,7 @@ class OSCClientTestBase(base.ClientTestBase):
|
||||
if availability_zone:
|
||||
cmd += f' --availability-zone {availability_zone}'
|
||||
if restart_check:
|
||||
cmd += f' --restart-check'
|
||||
cmd += ' --restart-check'
|
||||
|
||||
check_result = self.dict_result('share', cmd)
|
||||
return check_result
|
||||
|
@ -109,7 +109,7 @@ class ResourceLockTests(base.OSCClientTestBase):
|
||||
'lock list --lock-context user '
|
||||
f' --resource {self.share["id"]}')
|
||||
self.assertEqual(2, len(locks))
|
||||
self.assertNotIn(lock_3['id'], [l['ID'] for l in locks])
|
||||
self.assertNotIn(lock_3['id'], [lock['ID'] for lock in locks])
|
||||
|
||||
locks = self.listing_result('share',
|
||||
'lock list --lock-context user'
|
||||
@ -118,9 +118,9 @@ class ResourceLockTests(base.OSCClientTestBase):
|
||||
' --sort-dir desc '
|
||||
' --limit 1')
|
||||
self.assertEqual(1, len(locks))
|
||||
self.assertIn(lock_2['id'], [l['ID'] for l in locks])
|
||||
self.assertNotIn(lock_1['id'], [l['ID'] for l in locks])
|
||||
self.assertNotIn(lock_3['id'], [l['ID'] for l in locks])
|
||||
self.assertIn(lock_2['id'], [lock['ID'] for lock in locks])
|
||||
self.assertNotIn(lock_1['id'], [lock['ID'] for lock in locks])
|
||||
self.assertNotIn(lock_3['id'], [lock['ID'] for lock in locks])
|
||||
|
||||
def test_lock_set_unset_lock_reason(self):
|
||||
lock = self.create_resource_lock(self.share['id'],
|
||||
|
@ -186,7 +186,7 @@ class ListShareAccessRulesTestCase(base.OSCClientTestBase):
|
||||
output = self.openstack(
|
||||
'share',
|
||||
params=f'access list {share["id"]} --access-to {access_to_filter}',
|
||||
flags=f'--os-share-api-version 2.82')
|
||||
flags='--os-share-api-version 2.82')
|
||||
access_rule_list = self.parser.listing(output)
|
||||
|
||||
self.assertTrue(len(access_rule_list) == 1)
|
||||
@ -214,7 +214,7 @@ class ShowShareAccessRulesTestCase(base.OSCClientTestBase):
|
||||
self.assertEqual(access_rule_show['created_at'],
|
||||
access_rule['created_at'])
|
||||
self.assertEqual(access_rule_show['properties'], '')
|
||||
self.assertTrue('updated_at' in access_rule_show)
|
||||
self.assertIn('updated_at', access_rule_show)
|
||||
|
||||
|
||||
class SetShareAccessTestCase(base.OSCClientTestBase):
|
||||
|
@ -65,7 +65,7 @@ class FakeClient(object):
|
||||
break
|
||||
|
||||
assert found, 'Expected %s %s; got %s' % (
|
||||
expected, self.client.callstack)
|
||||
expected[0], expected[1], self.client.callstack)
|
||||
|
||||
if body is not None:
|
||||
try:
|
||||
|
@ -1087,7 +1087,7 @@ class FakeHTTPClient(fakes.FakeHTTPClient):
|
||||
return (200, {}, {'extra_specs': {'k': 'v'}})
|
||||
|
||||
def delete_types_1_extra_specs_k(self, **kw):
|
||||
return(204, {}, None)
|
||||
return (204, {}, None)
|
||||
|
||||
def delete_types_1(self, **kw):
|
||||
return (202, {}, None)
|
||||
|
@ -160,5 +160,5 @@ class TestLimitsManager(utils.TestCase):
|
||||
api.client.get.assert_called_once_with('/limits')
|
||||
|
||||
self.assertIsInstance(lim, limits.Limits)
|
||||
for l in lim.absolute:
|
||||
self.assertEqual(l1, l)
|
||||
for li in lim.absolute:
|
||||
self.assertEqual(l1, li)
|
||||
|
@ -50,7 +50,7 @@ class ShareNetworkTest(utils.TestCase):
|
||||
api_version = api_versions.APIVersion(microversion)
|
||||
values = self.values.copy()
|
||||
if (api_version >= api_versions.APIVersion("2.26")):
|
||||
del(values['nova_net_id'])
|
||||
del values['nova_net_id']
|
||||
body_expected = {share_networks.RESOURCE_NAME: values}
|
||||
|
||||
manager = share_networks.ShareNetworkManager(
|
||||
@ -123,7 +123,7 @@ class ShareNetworkTest(utils.TestCase):
|
||||
api_version = api_versions.APIVersion(microversion)
|
||||
values = self.values.copy()
|
||||
if (api_version >= api_versions.APIVersion("2.26")):
|
||||
del(values['nova_net_id'])
|
||||
del values['nova_net_id']
|
||||
body_expected = {share_networks.RESOURCE_NAME: values}
|
||||
|
||||
manager = share_networks.ShareNetworkManager(
|
||||
|
@ -4884,6 +4884,7 @@ def do_extend(cs, args):
|
||||
share = _find_share(cs, args.share)
|
||||
_print_share(cs, share)
|
||||
|
||||
|
||||
@cliutils.arg('share', metavar='<share>',
|
||||
help='Name or ID of share to shrink.')
|
||||
@cliutils.arg('new_size',
|
||||
|
@ -1,4 +1,4 @@
|
||||
hacking>=3.0.1,<3.1.0 # Apache-2.0
|
||||
hacking>=6.1.0,<6.2.0 # Apache-2.0
|
||||
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
ddt>=1.0.1 # MIT
|
||||
|
Loading…
Reference in New Issue
Block a user