Change asserts with more specific assert methods.

This patch replaces assertTrue(isinstance(a, b))
by native assert function assertIsInstance/assertNotIsInstance.

Change-Id: Ia3e34167a1c454fde1b28079c1742b99e1d40ff1
This commit is contained in:
Luong Anh Tuan 2016-08-31 18:43:24 +07:00 committed by Tuan Luong-Anh
parent d5066073a7
commit 375661ee23

View File

@ -265,9 +265,8 @@ class MigrationCheckersMixin(object):
self.assertIsInstance(rules.c.description.type, sqlalchemy.types.Text) self.assertIsInstance(rules.c.description.type, sqlalchemy.types.Text)
self.assertIn('disabled', col_names) self.assertIn('disabled', col_names)
# in some backends bool type is integer # in some backends bool type is integer
self.assertTrue(isinstance(rules.c.disabled.type, self.assertIsInstance(rules.c.disabled.type,
sqlalchemy.types.Boolean) or (sqlalchemy.types.Boolean,
isinstance(rules.c.disabled.type,
sqlalchemy.types.Integer)) sqlalchemy.types.Integer))
conditions = db_utils.get_table(engine, 'rule_conditions') conditions = db_utils.get_table(engine, 'rule_conditions')