Replace assertTrue(a in b) with assertIn(a, b)

Change-Id: Ic2338f549a660ddd0af70e2a1918fe6b29b2d0a2
This commit is contained in:
Anh Tran 2016-10-03 09:42:35 +07:00
parent c22d37b51c
commit 9372355173
1 changed files with 2 additions and 2 deletions

View File

@ -32,8 +32,8 @@ class UtilsTest(testtools.TestCase):
hook_type = "hook_type"
mixin = utils.HookableMixin()
mixin.add_hook(hook_type, self.func)
self.assertTrue(hook_type in mixin._hooks_map)
self.assertTrue(self.func in mixin._hooks_map[hook_type])
self.assertIn(hook_type, mixin._hooks_map)
self.assertIn(self.func, mixin._hooks_map[hook_type])
def test_run_hookable_mixin(self):
hook_type = "hook_type"