Ticket #8770: django-mysql-tests.diff

File django-mysql-tests.diff, 2.7 KB (added by Alex, 7 years ago)
  • tests/regressiontests/model_inheritance_regress/models.py

    diff --git a/tests/regressiontests/model_inheritance_regress/models.py b/tests/regressiontests/model_inheritance_regress/models.py
    index 716c7f5..a446a87 100644
    a b __test__ = {'API_TESTS':""" 
    8686[<Place: Guido's House of Pasta the place>, <Place: Main St the place>]
    8787
    8888>>> dicts = Restaurant.objects.values('name','serves_hot_dogs')
    89 >>> [sorted(d.items()) for d in dicts]
    90 [[('name', u"Guido's House of Pasta"), ('serves_hot_dogs', True)]]
     89>>> [sorted(d.items()) for d in dicts] == [[('name', u"Guido's House of Pasta"), ('serves_hot_dogs', True)]]
     90True
    9191
    9292>>> dicts = ItalianRestaurant.objects.values('name','serves_hot_dogs','serves_gnocchi')
    93 >>> [sorted(d.items()) for d in dicts]
    94 [[('name', u"Guido's House of Pasta"), ('serves_gnocchi', True), ('serves_hot_dogs', True)]]
     93>>> [sorted(d.items()) for d in dicts] == [[('name', u"Guido's House of Pasta"), ('serves_gnocchi', True), ('serves_hot_dogs', True)]]
     94True
    9595
    9696>>> dicts = ParkingLot.objects.values('name','capacity')
    9797>>> [sorted(d.items()) for d in dicts]
    __test__ = {'API_TESTS':""" 
    118118[<Place: Derelict lot the place>, <Place: Guido's All New House of Pasta the place>]
    119119
    120120>>> dicts = Restaurant.objects.values('name','serves_hot_dogs')
    121 >>> [sorted(d.items()) for d in dicts]
    122 [[('name', u"Guido's All New House of Pasta"), ('serves_hot_dogs', False)]]
     121>>> [sorted(d.items()) for d in dicts] == [[('name', u"Guido's All New House of Pasta"), ('serves_hot_dogs', False)]]
     122True
    123123
    124124>>> dicts = ItalianRestaurant.objects.values('name','serves_hot_dogs','serves_gnocchi')
    125 >>> [sorted(d.items()) for d in dicts]
    126 [[('name', u"Guido's All New House of Pasta"), ('serves_gnocchi', False), ('serves_hot_dogs', False)]]
     125>>> [sorted(d.items()) for d in dicts] == [[('name', u"Guido's All New House of Pasta"), ('serves_gnocchi', False), ('serves_hot_dogs', False)]]
     126True
    127127
    128128>>> dicts = ParkingLot.objects.values('name','capacity')
    129129>>> [sorted(d.items()) for d in dicts]
    __test__ = {'API_TESTS':""" 
    138138# Note that the name has not changed
    139139# - name is an attribute of Place, not ItalianRestaurant
    140140>>> dicts = ItalianRestaurant.objects.values('name','serves_hot_dogs','serves_gnocchi')
    141 >>> [sorted(d.items()) for d in dicts]
    142 [[('name', u"Guido's All New House of Pasta"), ('serves_gnocchi', False), ('serves_hot_dogs', False)]]
     141>>> [sorted(d.items()) for d in dicts] == [[('name', u"Guido's All New House of Pasta"), ('serves_gnocchi', False), ('serves_hot_dogs', False)]]
     142True
    143143
    144144# Regressions tests for #7105: dates() queries should be able to use fields
    145145# from the parent model as easily as the child.
Back to Top