- Timestamp:
- 11/16/08 02:48:24 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/tests/regressiontests/model_regress/models.py
r8782 r9466 28 28 29 29 class Party(models.Model): 30 when = models.DateField( )30 when = models.DateField(null=True) 31 31 32 32 class Event(models.Model): … … 94 94 [datetime.date(1998, 12, 31)] 95 95 96 # Date filtering was failing with NULL date values in SQLite (regression test 97 # for #3501, amongst other things). 98 >>> _ = Party.objects.create() 99 >>> p = Party.objects.filter(when__month=1)[0] 100 >>> p.when 101 datetime.date(1999, 1, 1) 102 >>> l = Party.objects.filter(pk=p.pk).dates("when", "month") 103 >>> l[0].month == 1 104 True 105 96 106 # Check that get_next_by_FIELD and get_previous_by_FIELD don't crash when we 97 107 # have usecs values stored on the database
