summaryrefslogtreecommitdiff
path: root/tests/migrations/test_operations.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/migrations/test_operations.py')
-rw-r--r--tests/migrations/test_operations.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/migrations/test_operations.py b/tests/migrations/test_operations.py
index 0135dbc538..b67a871bc8 100644
--- a/tests/migrations/test_operations.py
+++ b/tests/migrations/test_operations.py
@@ -3662,7 +3662,7 @@ class OperationTests(OperationTestBase):
),
# Literal "%" should be escaped in a way that is not a considered a
# wildcard.
- (models.Q(rebate__endswith="%"), {"rebate": "10%"}, {"rebate": "10$"}),
+ (models.Q(rebate__endswith="%"), {"rebate": "10%"}, {"rebate": "10%$"}),
# Right-hand-side baked "%" literals should not be used for
# parameters interpolation.
(
@@ -3670,6 +3670,12 @@ class OperationTests(OperationTestBase):
{"name": "Albert"},
{"name": "Albert", "surname": "Alberto"},
),
+ # Exact matches against "%" literals should also be supported.
+ (
+ models.Q(name="%"),
+ {"name": "%"},
+ {"name": "Albert"},
+ ),
]
for check, valid, invalid in checks:
with self.subTest(check=check, valid=valid, invalid=invalid):