Author: jacob
Date: 2008-09-01 17:28:18 -0500 (Mon, 01 Sep 2008)
New Revision: 8821

Modified:
   django/trunk/tests/regressiontests/model_inheritance_regress/models.py
Log:
Fixed #8770: made some tests more robust under MySQL. Thanks, Alex Gaynor.

Modified: django/trunk/tests/regressiontests/model_inheritance_regress/models.py
===================================================================
--- django/trunk/tests/regressiontests/model_inheritance_regress/models.py      
2008-09-01 22:22:12 UTC (rev 8820)
+++ django/trunk/tests/regressiontests/model_inheritance_regress/models.py      
2008-09-01 22:28:18 UTC (rev 8821)
@@ -98,12 +98,12 @@
 [<Place: Guido's House of Pasta the place>, <Place: Main St the place>]
 
 >>> dicts = Restaurant.objects.values('name','serves_hot_dogs')
->>> [sorted(d.items()) for d in dicts]
-[[('name', u"Guido's House of Pasta"), ('serves_hot_dogs', True)]]
+>>> [sorted(d.items()) for d in dicts] == [[('name', u"Guido's House of 
Pasta"), ('serves_hot_dogs', True)]]
+True
 
 >>> dicts = 
 >>> ItalianRestaurant.objects.values('name','serves_hot_dogs','serves_gnocchi')
->>> [sorted(d.items()) for d in dicts]
-[[('name', u"Guido's House of Pasta"), ('serves_gnocchi', True), 
('serves_hot_dogs', True)]]
+>>> [sorted(d.items()) for d in dicts] == [[('name', u"Guido's House of 
Pasta"), ('serves_gnocchi', True), ('serves_hot_dogs', True)]]
+True
 
 >>> dicts = ParkingLot.objects.values('name','capacity')
 >>> [sorted(d.items()) for d in dicts]
@@ -130,12 +130,12 @@
 [<Place: Derelict lot the place>, <Place: Guido's All New House of Pasta the 
place>]
 
 >>> dicts = Restaurant.objects.values('name','serves_hot_dogs')
->>> [sorted(d.items()) for d in dicts]
-[[('name', u"Guido's All New House of Pasta"), ('serves_hot_dogs', False)]]
+>>> [sorted(d.items()) for d in dicts] == [[('name', u"Guido's All New House 
of Pasta"), ('serves_hot_dogs', False)]]
+True
 
 >>> dicts = 
 >>> ItalianRestaurant.objects.values('name','serves_hot_dogs','serves_gnocchi')
->>> [sorted(d.items()) for d in dicts]
-[[('name', u"Guido's All New House of Pasta"), ('serves_gnocchi', False), 
('serves_hot_dogs', False)]]
+>>> [sorted(d.items()) for d in dicts] == [[('name', u"Guido's All New House 
of Pasta"), ('serves_gnocchi', False), ('serves_hot_dogs', False)]]
+True
 
 >>> dicts = ParkingLot.objects.values('name','capacity')
 >>> [sorted(d.items()) for d in dicts]
@@ -150,8 +150,8 @@
 # Note that the name has not changed
 # - name is an attribute of Place, not ItalianRestaurant
 >>> dicts = 
 >>> ItalianRestaurant.objects.values('name','serves_hot_dogs','serves_gnocchi')
->>> [sorted(d.items()) for d in dicts]
-[[('name', u"Guido's All New House of Pasta"), ('serves_gnocchi', False), 
('serves_hot_dogs', False)]]
+>>> [sorted(d.items()) for d in dicts] == [[('name', u"Guido's All New House 
of Pasta"), ('serves_gnocchi', False), ('serves_hot_dogs', False)]]
+True
 
 # Regressions tests for #7105: dates() queries should be able to use fields
 # from the parent model as easily as the child.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to