Update hacking version

Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: Ifc3b96d98c1a7feff187f953d487e12135887fb9
This commit is contained in:
jacky06
2019-03-06 22:41:58 +08:00
committed by caoyuan
parent 60a707e73a
commit b8ecb0bc03
6 changed files with 17 additions and 15 deletions
+4 -4
View File
@@ -28,10 +28,10 @@ import uuid
import six
if os.name == 'nt':
import msvcrt
else:
msvcrt = None
if os.name == 'nt': # noqa
import msvcrt # noqa
else: # noqa
msvcrt = None # noqa
from oslo_utils import encodeutils
from oslo_utils import strutils
+4 -4
View File
@@ -334,8 +334,8 @@ class ShellInvalidEndpointandParameterTest(utils.TestCase):
e = self.assertRaises(exc.CommandError, self.run_command,
'--os-image-api-version 1 image-create ' +
origin + ' fake_src --container-format bare')
self.assertEqual('error: Must provide --disk-format when using '
+ origin + '.', e.message)
self.assertEqual('error: Must provide --disk-format when using ' +
origin + '.', e.message)
@mock.patch('sys.stderr')
def test_image_create_missing_container_format(self, __):
@@ -536,8 +536,8 @@ class ShellStdinHandlingTests(testtools.TestCase):
self._do_update()
self.assertTrue(
'data' not in self.collected_args[1]
or self.collected_args[1]['data'] is None
'data' not in self.collected_args[1] or
self.collected_args[1]['data'] is None
)
def test_image_update_opened_stdin(self):
+1 -1
View File
@@ -57,7 +57,7 @@ def schema_args(schema_getter, omit=None):
return original_schema_args(my_schema_getter, omit)
utils.schema_args = schema_args
from glanceclient.v2 import shell as test_shell
from glanceclient.v2 import shell as test_shell # noqa
# Return original decorator.
utils.schema_args = original_schema_args
+4 -4
View File
@@ -45,11 +45,11 @@ _bool_strict = functools.partial(strutils.bool_from_string, strict=True)
help='Filter images to those that changed since the given time'
', which will include the deleted images.')
@utils.arg('--container-format', metavar='<CONTAINER_FORMAT>',
help='Filter images to those that have this container format. '
+ CONTAINER_FORMATS)
help='Filter images to those that have this container format. ' +
CONTAINER_FORMATS)
@utils.arg('--disk-format', metavar='<DISK_FORMAT>',
help='Filter images to those that have this disk format. '
+ DISK_FORMATS)
help='Filter images to those that have this disk format. ' +
DISK_FORMATS)
@utils.arg('--size-min', metavar='<SIZE>', type=int,
help='Filter images to those with a size greater than this.')
@utils.arg('--size-max', metavar='<SIZE>', type=int,