1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Replaced type-specific assertions with assertEqual().

Python docs say, "it's usually not necessary to invoke these methods directly."
This commit is contained in:
Tim Graham
2017-03-17 07:51:48 -04:00
committed by GitHub
parent e32265de1a
commit 6b4f018b2b
23 changed files with 93 additions and 102 deletions

View File

@@ -21,7 +21,7 @@ class RestrictedConditionsTests(TestCase):
use any joining columns, as long as an extra restriction is supplied.
"""
a = SlugPage.objects.get(slug='a')
self.assertListEqual(
self.assertEqual(
[p.slug for p in SlugPage.objects.filter(ascendants=a)],
['a', 'a/a', 'a/b', 'a/b/a'],
)
@@ -31,11 +31,11 @@ class RestrictedConditionsTests(TestCase):
)
aba = SlugPage.objects.get(slug='a/b/a')
self.assertListEqual(
self.assertEqual(
[p.slug for p in SlugPage.objects.filter(descendants__in=[aba])],
['a', 'a/b', 'a/b/a'],
)
self.assertListEqual(
self.assertEqual(
[p.slug for p in aba.ascendants.all()],
['a', 'a/b', 'a/b/a'],
)