summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-07-20 18:08:32 +0000
committerGerrit Code Review <review@openstack.org>2017-07-20 18:08:32 +0000
commit813e49db93e8dc664c7d9e1c4af3ba5ba116384f (patch)
tree9db7e9f94757d631a06e71c73d69b94bcbec9840
parente954fe4eedabe13f89b8e4c120db7f7195e71aae (diff)
parent20c23d8ccbdf14d2d97b039d6a8cca62f4b04873 (diff)
downloadpython-openstackclient-813e49db93e8dc664c7d9e1c4af3ba5ba116384f.tar.gz
Merge "Enable some off-by-default checks"
-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