'Test the custom ``django_extract method``, in particular against fields
which clash with strings passed to it (e.g. \'day\') - see #12818__.
__: http://code.djangoproject.com/ticket/12818'

def test_django_extract(self):

    updated = datetime.datetime(2010, 2, 20)
    models.SchoolClass.objects.create(year=2009, last_updated=updated)
    classes = models.SchoolClass.objects.filter(last_updated__day=20)
    self.assertEqual(len(classes), 1)
