diff options
author | lingyongxu <lyxu@fiberhome.com> | 2017-07-18 14:51:22 +0800 |
---|---|---|
committer | lingyongxu <lyxu@fiberhome.com> | 2017-07-18 14:51:28 +0800 |
commit | 02e89274e25984b2ae143d9c9eca5308b3cc180e (patch) | |
tree | 28a4f901aacaaa92067bfbba73f4141dda55e1d9 /cliff | |
parent | 772e16d6bbccdba4f7e43e8f4dd59d02251608b2 (diff) | |
download | cliff-02e89274e25984b2ae143d9c9eca5308b3cc180e.tar.gz |
Use assertIsNone(...) instead of assertIs(None,...)
Following OpenStack Style Guidelines: [1]
Unit test assertions tend to give better messages for more
specific assertions. As a result, assertIsNone(...) is
preferred over assertIs(None, ...)
[1] http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises
Change-Id: Ie4ee3be201f799d87c06378cd2c9a0a3c34c24df
Diffstat (limited to 'cliff')
-rw-r--r-- | cliff/tests/test_app.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cliff/tests/test_app.py b/cliff/tests/test_app.py index 4430d77..e26e4f7 100644 --- a/cliff/tests/test_app.py +++ b/cliff/tests/test_app.py @@ -73,9 +73,9 @@ class TestInteractiveMode(base.TestBase): app.interactive_app_factory = mock.MagicMock( name='interactive_app_factory' ) - self.assertIs(None, app.interpreter) + self.assertIsNone(app.interpreter) app.run([]) - self.assertIsNot(None, app.interpreter) + self.assertIsNotNone(app.interpreter) cmdloop = app.interactive_app_factory.return_value.cmdloop cmdloop.assert_called_once_with() |