mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #23620 -- Used more specific assertions in the Django test suite.
This commit is contained in:
committed by
Tim Graham
parent
c0c78f1b70
commit
f7969b0920
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user