mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
This commit is contained in:
@@ -1366,6 +1366,12 @@ class LookupTests(TestCase):
|
||||
[stock_1, stock_2],
|
||||
)
|
||||
|
||||
def test_lookup_direct_value_rhs_unwrapped(self):
|
||||
with self.assertNumQueries(1) as ctx:
|
||||
self.assertIs(Author.objects.filter(GreaterThan(2, 1)).exists(), True)
|
||||
# Direct values on RHS are not wrapped.
|
||||
self.assertIn("2 > 1", ctx.captured_queries[0]["sql"])
|
||||
|
||||
|
||||
class LookupQueryingTests(TestCase):
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user