Code

Ticket #8770: django-mysql-tests.diff

File django-mysql-tests.diff, 2.7 KB (added by Alex, 6 years ago)
Line 
1diff --git a/tests/regressiontests/model_inheritance_regress/models.py b/tests/regressiontests/model_inheritance_regress/models.py
2index 716c7f5..a446a87 100644
3--- a/tests/regressiontests/model_inheritance_regress/models.py
4+++ b/tests/regressiontests/model_inheritance_regress/models.py
5@@ -86,12 +86,12 @@ __test__ = {'API_TESTS':"""
6 [<Place: Guido's House of Pasta the place>, <Place: Main St the place>]
7 
8 >>> dicts = Restaurant.objects.values('name','serves_hot_dogs')
9->>> [sorted(d.items()) for d in dicts]
10-[[('name', u"Guido's House of Pasta"), ('serves_hot_dogs', True)]]
11+>>> [sorted(d.items()) for d in dicts] == [[('name', u"Guido's House of Pasta"), ('serves_hot_dogs', True)]]
12+True
13 
14 >>> dicts = ItalianRestaurant.objects.values('name','serves_hot_dogs','serves_gnocchi')
15->>> [sorted(d.items()) for d in dicts]
16-[[('name', u"Guido's House of Pasta"), ('serves_gnocchi', True), ('serves_hot_dogs', True)]]
17+>>> [sorted(d.items()) for d in dicts] == [[('name', u"Guido's House of Pasta"), ('serves_gnocchi', True), ('serves_hot_dogs', True)]]
18+True
19 
20 >>> dicts = ParkingLot.objects.values('name','capacity')
21 >>> [sorted(d.items()) for d in dicts]
22@@ -118,12 +118,12 @@ __test__ = {'API_TESTS':"""
23 [<Place: Derelict lot the place>, <Place: Guido's All New House of Pasta the place>]
24 
25 >>> dicts = Restaurant.objects.values('name','serves_hot_dogs')
26->>> [sorted(d.items()) for d in dicts]
27-[[('name', u"Guido's All New House of Pasta"), ('serves_hot_dogs', False)]]
28+>>> [sorted(d.items()) for d in dicts] == [[('name', u"Guido's All New House of Pasta"), ('serves_hot_dogs', False)]]
29+True
30 
31 >>> dicts = ItalianRestaurant.objects.values('name','serves_hot_dogs','serves_gnocchi')
32->>> [sorted(d.items()) for d in dicts]
33-[[('name', u"Guido's All New House of Pasta"), ('serves_gnocchi', False), ('serves_hot_dogs', False)]]
34+>>> [sorted(d.items()) for d in dicts] == [[('name', u"Guido's All New House of Pasta"), ('serves_gnocchi', False), ('serves_hot_dogs', False)]]
35+True
36 
37 >>> dicts = ParkingLot.objects.values('name','capacity')
38 >>> [sorted(d.items()) for d in dicts]
39@@ -138,8 +138,8 @@ __test__ = {'API_TESTS':"""
40 # Note that the name has not changed
41 # - name is an attribute of Place, not ItalianRestaurant
42 >>> dicts = ItalianRestaurant.objects.values('name','serves_hot_dogs','serves_gnocchi')
43->>> [sorted(d.items()) for d in dicts]
44-[[('name', u"Guido's All New House of Pasta"), ('serves_gnocchi', False), ('serves_hot_dogs', False)]]
45+>>> [sorted(d.items()) for d in dicts] == [[('name', u"Guido's All New House of Pasta"), ('serves_gnocchi', False), ('serves_hot_dogs', False)]]
46+True
47 
48 # Regressions tests for #7105: dates() queries should be able to use fields
49 # from the parent model as easily as the child.