mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +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
@@ -11,9 +11,9 @@ class IntrospectionTests(TestCase):
|
||||
def test_table_names(self):
|
||||
tl = connection.introspection.table_names()
|
||||
self.assertEqual(tl, sorted(tl))
|
||||
self.assertTrue(Reporter._meta.db_table in tl,
|
||||
self.assertIn(Reporter._meta.db_table, tl,
|
||||
"'%s' isn't in table_list()." % Reporter._meta.db_table)
|
||||
self.assertTrue(Article._meta.db_table in tl,
|
||||
self.assertIn(Article._meta.db_table, tl,
|
||||
"'%s' isn't in table_list()." % Article._meta.db_table)
|
||||
|
||||
def test_django_table_names(self):
|
||||
@@ -60,7 +60,7 @@ class IntrospectionTests(TestCase):
|
||||
def test_sequence_list(self):
|
||||
sequences = connection.introspection.sequence_list()
|
||||
expected = {'table': Reporter._meta.db_table, 'column': 'id'}
|
||||
self.assertTrue(expected in sequences,
|
||||
self.assertIn(expected, sequences,
|
||||
'Reporter sequence not found in sequence_list()')
|
||||
|
||||
def test_get_table_description_names(self):
|
||||
|
||||
Reference in New Issue
Block a user