From e16d09d428e2b1a490eac08286453cc11f8765d9 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Thu, 22 Apr 2021 16:34:08 +0200 Subject: [PATCH] Fix testing Change-Id: I2a340ad11483321aae7a64a53ddda09cb5bc9aa7 --- lower-constraints.txt | 12 ++++++------ magnum_ui/api/rest/magnum.py | 2 +- magnum_ui/test/api_tests/test_rest_api.py | 2 +- test-requirements.txt | 6 +----- tools/install_venv.py | 1 + tools/install_venv_common.py | 2 +- 6 files changed, 11 insertions(+), 14 deletions(-) diff --git a/lower-constraints.txt b/lower-constraints.txt index 4788e80f..bded1a49 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -25,10 +25,10 @@ dulwich==0.19.0 extras==1.0.0 fasteners==0.14.1 fixtures==3.0.0 -flake8==2.5.5 +flake8==3.8.0 futurist==1.6.0 -hacking==0.12.0 -horizon==17.1.0 +hacking==4.0.0 +horizon==18.5.0 idna==2.6 imagesize==1.0.0 iso8601==0.1.12 @@ -40,7 +40,7 @@ jsonschema==2.6.0 keystoneauth1==3.4.0 linecache2==1.0.0 MarkupSafe==1.0 -mccabe==0.2.1 +mccabe==0.6.0 monotonic==1.4 msgpack==0.5.6 munch==2.2.0 @@ -66,7 +66,7 @@ pep8==1.5.7 Pint==0.8.1 prettytable==0.7.2 pycparser==2.18 -pyflakes==2.1.1 +pyflakes==2.2.0 Pygments==2.2.0 pyinotify==0.9.6 pymongo==3.6.1 @@ -126,7 +126,7 @@ XStatic-jquery-ui==1.12.0.1 XStatic-JQuery.quicksearch==2.0.3.1 XStatic-JQuery.TableSorter==2.14.5.1 XStatic-JSEncrypt==2.3.1.1 -XStatic-mdi==1.4.57.0 +XStatic-mdi==1.6.50.2 XStatic-objectpath==1.2.1.0 XStatic-Rickshaw==1.5.0.0 XStatic-roboto-fontface==0.5.0.0 diff --git a/magnum_ui/api/rest/magnum.py b/magnum_ui/api/rest/magnum.py index 22dd7c69..57cad654 100644 --- a/magnum_ui/api/rest/magnum.py +++ b/magnum_ui/api/rest/magnum.py @@ -232,7 +232,7 @@ class ClusterResize(generic.View): worker_nodes = [] for server in servers: - if (server.name.startswith("%s-minion" % stack.stack_name) or + if (server.name.startswith("%s-minion" % stack.stack_name) or # noqa server.name.startswith("%s-node" % stack.stack_name)): worker_nodes.append({"name": server.name, "id": server.id}) diff --git a/magnum_ui/test/api_tests/test_rest_api.py b/magnum_ui/test/api_tests/test_rest_api.py index dae7c86e..96bf8014 100644 --- a/magnum_ui/test/api_tests/test_rest_api.py +++ b/magnum_ui/test/api_tests/test_rest_api.py @@ -59,7 +59,7 @@ class MagnumRestTestCase(test.TestCase): def test_cluster_template_delete(self, client): test_cluster_template = TEST.cluster_templates.first() request = self.mock_rest_request( - body='{"cluster_template_id":' + + body='{"cluster_template_id":' + # noqa str(test_cluster_template['uuid']) + '}') response = magnum.ClusterTemplates().delete(request) diff --git a/test-requirements.txt b/test-requirements.txt index c9bfa73d..e261ca24 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,11 +7,7 @@ # be installed in a specific order. # # Hacking should appear first in case something else depends on pep8 -hacking>=1.1.0,<1.2.0 # Apache-2.0 -# remove this pyflakes from here once you bump the -# hacking to 3.2.0 or above. hacking 3.2.0 takes -# care of pyflakes version compatibilty. -pyflakes>=2.1.1 +hacking>=4.0.0,<4.1.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 nodeenv>=0.9.4 # BSD diff --git a/tools/install_venv.py b/tools/install_venv.py index b4ffff5b..e561a56c 100644 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -67,5 +67,6 @@ def main(argv): install.install_dependencies() print_help(venv, root) + if __name__ == '__main__': sys.exit(main(sys.argv)) diff --git a/tools/install_venv_common.py b/tools/install_venv_common.py index 4cc27b07..dc0bbb76 100644 --- a/tools/install_venv_common.py +++ b/tools/install_venv_common.py @@ -70,7 +70,7 @@ class InstallVenv(object): check_exit_code)[0] def get_distro(self): - if (os.path.exists('/etc/fedora-release') or + if (os.path.exists('/etc/fedora-release') or # noqa os.path.exists('/etc/redhat-release')): return Fedora( self.root, self.venv, self.requirements,