Fixed #23620 -- Used more specific assertions in the Django test suite.

This commit is contained in:
Berker Peksag 2014-10-28 12:02:56 +02:00 committed by Tim Graham
parent c0c78f1b70
commit f7969b0920
83 changed files with 419 additions and 429 deletions

View file

@ -50,7 +50,7 @@ class ManyToManyUnmanagedTests(TestCase):
"""
table = Unmanaged2._meta.get_field('mm').m2m_db_table()
tables = connection.introspection.table_names()
self.assertTrue(table not in tables, "Table '%s' should not exist, but it does." % table)
self.assertNotIn(table, tables, "Table '%s' should not exist, but it does." % table)
def test_many_to_many_between_unmanaged_and_managed(self):
"""
@ -58,4 +58,4 @@ class ManyToManyUnmanagedTests(TestCase):
"""
table = Managed1._meta.get_field('mm').m2m_db_table()
tables = connection.introspection.table_names()
self.assertTrue(table in tables, "Table '%s' does not exist." % table)
self.assertIn(table, tables, "Table '%s' does not exist." % table)