mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Refs #14030 -- Improved expression support for python values
This commit is contained in:
parent
07cfe1bd82
commit
e2d6e14662
7 changed files with 89 additions and 88 deletions
|
@ -281,7 +281,7 @@ class FunctionTests(TestCase):
|
|||
def test_substr_with_expressions(self):
|
||||
Author.objects.create(name='John Smith', alias='smithj')
|
||||
Author.objects.create(name='Rhonda')
|
||||
authors = Author.objects.annotate(name_part=Substr('name', V(5), V(3)))
|
||||
authors = Author.objects.annotate(name_part=Substr('name', 5, 3))
|
||||
self.assertQuerysetEqual(
|
||||
authors.order_by('name'), [
|
||||
' Sm',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue