Ticket #8683: DateQuerySet-assertion-test.diff

File DateQuerySet-assertion-test.diff, 812 bytes (added by vung, 16 years ago)

Not sure this is worth a test, but just in case.

  • tests/regressiontests/queries/models.py

     
    901901>>> qs = Item.objects.dates('created', 'month')
    902902>>> _ = pickle.loads(pickle.dumps(qs))
    903903
     904Bug #8683 -- raise proper error when a DateQuerySet gets passed a wrong type of field
     905>>> Item.objects.dates('name', 'month')
     906Traceback (most recent call last):
     907...
     908AssertionError: 'name' isn't a DateField.
     909
    904910Bug #8597: regression tests for case-insensitive comparisons
    905911>>> _ = Item.objects.create(name="a_b", created=datetime.datetime.now(), creator=a2, note=n1)
    906912>>> _ = Item.objects.create(name="x%y", created=datetime.datetime.now(), creator=a2, note=n1)
Back to Top