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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user