1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #27203 -- Replaced assertQuerysetEqual(..., lambda o: o) with assertSequenceEqual().

This commit is contained in:
Mads Jensen
2016-09-10 11:36:27 +02:00
committed by Tim Graham
parent 8b050cf9dc
commit 0c1f71635f
23 changed files with 262 additions and 504 deletions

View File

@@ -32,12 +32,11 @@ class ModelInheritanceTests(TestCase):
# The children inherit the Meta class of their parents (if they don't
# specify their own).
self.assertQuerysetEqual(
self.assertSequenceEqual(
Worker.objects.values("name"), [
{"name": "Barney"},
{"name": "Fred"},
],
lambda o: o
)
# Since Student does not subclass CommonInfo's Meta, it has the effect
@@ -313,11 +312,10 @@ class ModelInheritanceDataTests(TestCase):
def test_values_works_on_parent_model_fields(self):
# The values() command also works on fields from parent models.
self.assertQuerysetEqual(
self.assertSequenceEqual(
ItalianRestaurant.objects.values("name", "rating"), [
{"rating": 4, "name": "Ristorante Miron"},
],
lambda o: o
)
def test_select_related_works_on_parent_model_fields(self):