mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Refs #32231 -- Added tests for QuerySet.raw() with an escaped % symbol.
This commit is contained in:
parent
2d6c9b97bc
commit
aa3d360631
@ -180,6 +180,11 @@ class RawQueryTests(TestCase):
|
||||
self.assertEqual(len(results), 1)
|
||||
self.assertIsInstance(repr(qset), str)
|
||||
|
||||
def test_escaped_percent(self):
|
||||
query = "SELECT * FROM raw_query_author WHERE first_name like 'J%%'"
|
||||
qset = Author.objects.raw(query)
|
||||
self.assertEqual(len(qset), 2)
|
||||
|
||||
@skipUnlessDBFeature('supports_paramstyle_pyformat')
|
||||
def test_pyformat_params(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user