summaryrefslogtreecommitdiff
path: root/tests/introspection
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2014-10-28 12:02:56 +0200
committerTim Graham <timograham@gmail.com>2014-11-03 11:56:37 -0500
commitf7969b0920c403118656f6bfec58d6454d79ef1a (patch)
tree866df7de0524251323fef2b4262e672150d95f00 /tests/introspection
parentc0c78f1b707f825eee974c65515a837f8cf46e66 (diff)
downloaddjango-f7969b0920c403118656f6bfec58d6454d79ef1a.tar.gz
Fixed #23620 -- Used more specific assertions in the Django test suite.
Diffstat (limited to 'tests/introspection')
-rw-r--r--tests/introspection/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/introspection/tests.py b/tests/introspection/tests.py
index 201d832e2d..d63358dafd 100644
--- a/tests/introspection/tests.py
+++ b/tests/introspection/tests.py
@@ -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):