1
0
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:
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

@@ -22,7 +22,7 @@ class NullFkOrderingTests(TestCase):
# We can't compare results directly (since different databases sort NULLs to
# different ends of the ordering), but we can check that all results are
# returned.
self.assertTrue(len(list(Article.objects.all())) == 3)
self.assertEqual(len(list(Article.objects.all())), 3)
s = SystemInfo.objects.create(system_name='System Info')
f = Forum.objects.create(system_info=s, forum_name='First forum')
@@ -39,4 +39,4 @@ class NullFkOrderingTests(TestCase):
# everything else, some sort them afterwards. So we extract the ordered list
# and check the length. Before the fix, this list was too short (some values
# were omitted).
self.assertTrue(len(list(Comment.objects.all())) == 4)
self.assertEqual(len(list(Comment.objects.all())), 4)