Commits

Tobias McNulty  committed 092acf2

regression test for #13640

  • Participants
  • Parent commits 06ee75d
  • Branches ticket-13640

Comments (0)

Files changed (1)

File tests/regressiontests/model_regress/tests.py

-from models import Worker
+from models import Worker, Department
 from django.test import TestCase
 
 class RelatedModelOrderedLookupTest(TestCase):
 
     def test_related_lte_lookup(self):
         Worker.objects.filter(department__lte=0)
+
+
+class EvaluateMethodTest(TestCase):
+    """
+    Regression test for #13640: cannot filter by objects with 'evaluate' attr
+    """
+
+    def test_model_with_evaluate_method(self):
+        """
+        Ensures that you can filter by objects that have an 'evaluate' attr
+        """
+        dept = Department.objects.create(pk=1, name='abc')
+        dept.evaluate = 'abc'
+        Worker.objects.filter(department=dept)