Refs #14030 -- Improved expression support for python values

This commit is contained in:
Josh Smeaton 2015-02-11 16:38:02 +11:00
parent 07cfe1bd82
commit e2d6e14662
7 changed files with 89 additions and 88 deletions

View file

@ -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',