diff --git a/scciclient/irmc/scci.py b/scciclient/irmc/scci.py index 1fe1cdd..350cec7 100755 --- a/scciclient/irmc/scci.py +++ b/scciclient/irmc/scci.py @@ -259,8 +259,10 @@ class ShareType(object): def get_share_type(share_type): """get share type.""" - return({'nfs': ShareType.nfs, - 'cifs': ShareType.cifs}[share_type.lower()]) + return { + 'nfs': ShareType.nfs, + 'cifs': ShareType.cifs + }[share_type.lower()] def scci_cmd(host, userid, password, cmd, port=443, auth_method='basic', diff --git a/scciclient/tests/irmc/test_scci.py b/scciclient/tests/irmc/test_scci.py index ef3fb7d..d0013db 100644 --- a/scciclient/tests/irmc/test_scci.py +++ b/scciclient/tests/irmc/test_scci.py @@ -129,7 +129,7 @@ IRMC_CONFIG_PARTIAL = """0 -""" +""" # noqa: E501 class SCCITestCase(testtools.TestCase): diff --git a/scciclient/tests/irmc/viom/test_client.py b/scciclient/tests/irmc/viom/test_client.py index 31b613c..bd8535e 100644 --- a/scciclient/tests/irmc/viom/test_client.py +++ b/scciclient/tests/irmc/viom/test_client.py @@ -813,7 +813,7 @@ class PhysicalPortIDParseTestCase(testtools.TestCase): def _validate_handler(self, handler, handler_class, slot_type, card_type, slot_idx, card_idx, port_idx): - self.assertTrue(isinstance(handler, handler_class)) + self.assertIsInstance(handler, handler_class) self.assertEqual(slot_type, handler.slot_type) self.assertEqual(card_type, handler.card_type) self.assertEqual(slot_idx, handler.slot_idx) diff --git a/tox.ini b/tox.ini index 75d5855..950065a 100644 --- a/tox.ini +++ b/tox.ini @@ -8,17 +8,18 @@ ignore_basepython_conflict=true usedevelop = True install_command = pip install {opts} {packages} deps = - -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} [testenv:pep8] basepython = python3 deps = - hacking>=3.1.0,<4.0.0 # Apache-2.0 + hacking>=7.0.0,<7.1.0 # Apache-2.0 doc8>=0.6.0 # Apache-2.0 - flake8-import-order>=0.17.1 # LGPLv3 - pycodestyle>=2.0.0,<2.7.0 # MIT + flake8-import-order>=0.18.0,<0.19.0 # LGPLv3 + pycodestyle>=2.0.0 # MIT Pygments>=2.2.0 # BSD commands = flake8 {posargs} @@ -41,8 +42,9 @@ commands = [testenv:docs] basepython = python3 deps = - -r{toxinidir}/requirements.txt - -r{toxinidir}/doc/requirements.txt + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/requirements.txt + -r{toxinidir}/doc/requirements.txt commands = sphinx-build -b html doc/source doc/build/html