summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/expressions/tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/expressions/tests.py b/tests/expressions/tests.py
index 973176e223..9a646088b1 100644
--- a/tests/expressions/tests.py
+++ b/tests/expressions/tests.py
@@ -595,6 +595,10 @@ class BasicExpressionsTests(TestCase):
with self.assertRaisesMessage(FieldError, "Cannot resolve keyword 'nope' into field."):
list(Employee.objects.filter(firstname=F('nope')))
+ def test_incorrect_joined_field_in_F_expression(self):
+ with self.assertRaisesMessage(FieldError, "Cannot resolve keyword 'nope' into field."):
+ list(Company.objects.filter(ceo__pk=F('point_of_contact__nope')))
+
class IterableLookupInnerExpressionsTests(TestCase):
@classmethod