From 1cdfbde4db1ac6bbddb2cf8dd5192831bc0f9ce3 Mon Sep 17 00:00:00 2001 From: Josh Smeaton Date: Mon, 29 Dec 2014 09:15:00 +1100 Subject: Fixed #23753 -- Oracle failure with Coalesce --- tests/db_functions/tests.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') 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') -- cgit v1.3