mirror of
https://github.com/django/django.git
synced 2024-12-25 02:26:12 +00:00
fb9ac5729d
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10692 bcc190cf-cafb-0310-a4f2-bffc1f526a37
17 lines
493 B
Python
17 lines
493 B
Python
from models import Worker
|
|
from django.test import TestCase
|
|
|
|
class RelatedModelOrderedLookupTest(TestCase):
|
|
"""
|
|
Regression test for #10153: foreign key __gte and __lte lookups.
|
|
"""
|
|
|
|
# The bug is that the following queries would raise:
|
|
# "TypeError: Related Field has invalid lookup: gte"
|
|
|
|
def test_related_gte_lookup(self):
|
|
Worker.objects.filter(department__gte=0)
|
|
|
|
def test_related_lte_lookup(self):
|
|
Worker.objects.filter(department__lte=0)
|