Ticket #10153: related_field_lookup_patch_1_test.diff

File related_field_lookup_patch_1_test.diff, 755 bytes (added by Andy Durdin, 16 years ago)

Patch just containing a regression test

  • tests/regressiontests/model_regress/tests.py

     
     1from django.test import TestCase
     2
     3class RelatedModelOrderedLookupTest(TestCase):
     4    """Regression test for #10153"""
     5    def test_related_gte_lookup(self):
     6        from models import Worker
     7
     8        # The bug is that the following query raises
     9        # "TypeError: Related Field has invalid lookup: gte"
     10        Worker.objects.filter(department__gte=0)
     11
     12    def test_related_lte_lookup(self):
     13        from models import Worker
     14
     15        Worker.objects.filter(department__lte=0)
Back to Top