diff --git a/packstack/installer/run_setup.py b/packstack/installer/run_setup.py index dbb421034..b12817147 100644 --- a/packstack/installer/run_setup.py +++ b/packstack/installer/run_setup.py @@ -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: diff --git a/packstack/installer/utils/network.py b/packstack/installer/utils/network.py index bf637dbb9..ec6862afc 100644 --- a/packstack/installer/utils/network.py +++ b/packstack/installer/utils/network.py @@ -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 diff --git a/test-requirements.txt b/test-requirements.txt index 607a38254..fa9310cdb 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -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 diff --git a/tests/installer/test_arch.py b/tests/installer/test_arch.py index 33d474c10..67d179806 100644 --- a/tests/installer/test_arch.py +++ b/tests/installer/test_arch.py @@ -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 diff --git a/tests/installer/test_sequences.py b/tests/installer/test_sequences.py index ad7767285..fe05731ca 100644 --- a/tests/installer/test_sequences.py +++ b/tests/installer/test_sequences.py @@ -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)