From 09131e136227a8dfb40a8b248aa7faf52d299547 Mon Sep 17 00:00:00 2001 From: Cao Xuan Hoang Date: Mon, 26 Sep 2016 15:33:18 +0700 Subject: [PATCH] Using assertIsNone() instead of assertIs(None) Following OpenStack Style Guidelines[1]: [H203] Unit test assertions tend to give better messages for more specific assertions. As a result, assertIsNone(...) is preferred over assertEqual(None, ...) and assertIs(..,None) [1] http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises Change-Id: I9b0cedae367798ce282b0229c135b3f4a72f353a --- keystone/tests/unit/test_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keystone/tests/unit/test_config.py b/keystone/tests/unit/test_config.py index 52dfdae22e..36fa73343e 100644 --- a/keystone/tests/unit/test_config.py +++ b/keystone/tests/unit/test_config.py @@ -45,8 +45,8 @@ class ConfigTestCase(unit.TestCase): wsgi.find_paste_config()) def test_config_default(self): - self.assertIs(None, CONF.auth.password) - self.assertIs(None, CONF.auth.token) + self.assertIsNone(CONF.auth.password) + self.assertIsNone(CONF.auth.token) def test_profiler_config_default(self): """Check config.set_config_defaults() has set [profiler]enabled."""