diff --git a/openstackclient/tests/functional/volume/v1/test_service.py b/openstackclient/tests/functional/volume/v1/test_service.py index c921c46aaa..fee73f189c 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 8d1944e404..6986fde69b 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 ac5c6593fe..0f22650a9a 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