summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/db_functions/tests.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/db_functions/tests.py b/tests/db_functions/tests.py
index 089fd11a8a..2ab18b61e0 100644
--- a/tests/db_functions/tests.py
+++ b/tests/db_functions/tests.py
@@ -56,6 +56,18 @@ class FunctionTests(TestCase):
lambda a: a.headline
)
+ # mixed Text and Char wrapped
+ article = Article.objects.annotate(
+ headline=Coalesce(Lower('summary'), Lower('text'), output_field=TextField()),
+ )
+
+ self.assertQuerysetEqual(
+ article.order_by('title'), [
+ lorem_ipsum.lower(),
+ ],
+ lambda a: a.headline
+ )
+
def test_concat(self):
Author.objects.create(name='Jayden')
Author.objects.create(name='John Smith', alias='smithj', goes_by='John')