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:
parent
d5066073a7
commit
375661ee23
@ -265,10 +265,9 @@ class MigrationCheckersMixin(object):
|
||||
self.assertIsInstance(rules.c.description.type, sqlalchemy.types.Text)
|
||||
self.assertIn('disabled', col_names)
|
||||
# in some backends bool type is integer
|
||||
self.assertTrue(isinstance(rules.c.disabled.type,
|
||||
sqlalchemy.types.Boolean) or
|
||||
isinstance(rules.c.disabled.type,
|
||||
sqlalchemy.types.Integer))
|
||||
self.assertIsInstance(rules.c.disabled.type,
|
||||
(sqlalchemy.types.Boolean,
|
||||
sqlalchemy.types.Integer))
|
||||
|
||||
conditions = db_utils.get_table(engine, 'rule_conditions')
|
||||
col_names = [column.name for column in conditions.c]
|
||||
|
Loading…
Reference in New Issue
Block a user