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
This commit is contained in:
parent
cb2b548f6b
commit
09131e1362
|
@ -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."""
|
||||
|
|
Loading…
Reference in New Issue