summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openstackclient/tests/functional/volume/v1/test_service.py5
-rw-r--r--openstackclient/tests/functional/volume/v2/test_service.py3
-rw-r--r--tox.ini2
3 files changed, 4 insertions, 6 deletions
diff --git a/openstackclient/tests/functional/volume/v1/test_service.py b/openstackclient/tests/functional/volume/v1/test_service.py
index c921c46a..fee73f18 100644
--- a/openstackclient/tests/functional/volume/v1/test_service.py
+++ b/openstackclient/tests/functional/volume/v1/test_service.py
@@ -64,10 +64,7 @@ class VolumeServiceTests(common.BaseVolumeTests):
'enabled',
cmd_output[0]['Status']
)
- self.assertEqual(
- None,
- cmd_output[0]['Disabled Reason']
- )
+ self.assertIsNone(cmd_output[0]['Disabled Reason'])
# Test volume service set --disable and --disable-reason
disable_reason = 'disable_reason'
diff --git a/openstackclient/tests/functional/volume/v2/test_service.py b/openstackclient/tests/functional/volume/v2/test_service.py
index 8d1944e4..6986fde6 100644
--- a/openstackclient/tests/functional/volume/v2/test_service.py
+++ b/openstackclient/tests/functional/volume/v2/test_service.py
@@ -64,8 +64,7 @@ class VolumeServiceTests(common.BaseVolumeTests):
'enabled',
cmd_output[0]['Status']
)
- self.assertEqual(
- None,
+ self.assertIsNone(
cmd_output[0]['Disabled Reason']
)
diff --git a/tox.ini b/tox.ini
index ac5c6593..0f22650a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -85,6 +85,8 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
[flake8]
show-source = True
+# H203: Use assertIs(Not)None to check for None
+enable-extensions = H203
exclude = .git,.tox,dist,doc,*lib/python*,*egg,build,tools
# If 'ignore' is not set there are default errors and warnings that are set
# Doc: http://flake8.readthedocs.org/en/latest/config.html#default