1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #35603 -- Prevented F.__contains__() from hanging.

Regression in 94b6f101f7.
This commit is contained in:
Simon Charette
2024-07-17 14:52:08 -04:00
committed by Sarah Boyce
parent 182f262b15
commit 6b3f55446f
2 changed files with 10 additions and 0 deletions

View File

@@ -1302,6 +1302,11 @@ class FTests(SimpleTestCase):
self.assertNotEqual(f, value)
self.assertNotEqual(value, f)
def test_contains(self):
msg = "argument of type 'F' is not iterable"
with self.assertRaisesMessage(TypeError, msg):
"" in F("name")
class ExpressionsTests(TestCase):
def test_F_reuse(self):