Bump hacking

hacking 3.1.x is quite old. Bump it to the current latest version.

Also remove the 3rd party mock module as suggested by newer hacking.

Change-Id: I5e8115cd640fa438cf2d69020e64257a14ed5243
This commit is contained in:
Takashi Kajinami 2024-09-23 23:32:09 +09:00
parent 45e0268d18
commit 47e5968df4
5 changed files with 7 additions and 9 deletions

View File

@ -98,8 +98,8 @@ def _getInputFromUser(param):
message.write(param.PROMPT)
val_list = param.VALIDATORS or []
if(validators.validate_regexp not in val_list
and param.OPTION_LIST):
if (validators.validate_regexp not in val_list
and param.OPTION_LIST):
message.write(" [%s]" % "|".join(param.OPTION_LIST))
if param.DEFAULT_VALUE:

View File

@ -119,7 +119,7 @@ def is_ipv4(host):
def force_ip(host, allow_localhost=False):
if not(is_ipv6(host) or is_ipv4(host)):
if not (is_ipv6(host) or is_ipv4(host)):
host = host2ip(host, allow_localhost=allow_localhost)
return host

View File

@ -3,5 +3,4 @@ openstackdocstheme>=1.17.0 # Apache-2.0
reno>=0.1.1 # Apache2
stestr>=1.0.0 # Apache-2.0
coverage
hacking>=3.1.0,<3.2.0 # Apache-2.0
mock>=2.0 # BSD
hacking>=7.0.0,<7.1.0 # Apache-2.0

View File

@ -19,8 +19,7 @@
Test cases for packstack.installer.core.arch module.
"""
import mock
from unittest import mock
from unittest import TestCase
from packstack.installer.core import arch

View File

@ -48,8 +48,8 @@ class StepTestCase(PackstackTestCaseMixin, TestCase):
contents = sys.stdout.getvalue()
state = '[ %s ]\n' % utils.color_text('DONE', 'green')
if(not contents.startswith('Running test') or
not contents.endswith(state)):
if (not contents.startswith('Running test') or
not contents.endswith(state)):
raise AssertionError('Step run test failed: %s' % contents)