From a253a580e6f20fb7087490225538422eb6cab0bb Mon Sep 17 00:00:00 2001 From: Tom Forbes Date: Tue, 5 Jun 2018 11:13:29 +0100 Subject: [PATCH] Refs #29451 -- Quoted MySQL column names in tests. --- tests/queries/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/queries/tests.py b/tests/queries/tests.py index ea55cfc76e..941383bb1c 100644 --- a/tests/queries/tests.py +++ b/tests/queries/tests.py @@ -1636,7 +1636,7 @@ class Queries5Tests(TestCase): ['', '', ''] ) - qs = Ranking.objects.extra(select={'good': 'case when rank > 2 then 1 else 0 end'}) + qs = Ranking.objects.extra(select={'good': 'case when `rank` > 2 then 1 else 0 end'}) self.assertEqual( [o.good for o in qs.extra(order_by=('-good',))], [True, False, False] @@ -1657,7 +1657,7 @@ class Queries5Tests(TestCase): def test_ticket7256(self): # An empty values() call includes all aliases, including those from an # extra() - qs = Ranking.objects.extra(select={'good': 'case when rank > 2 then 1 else 0 end'}) + qs = Ranking.objects.extra(select={'good': 'case when `rank` > 2 then 1 else 0 end'}) dicts = qs.values().order_by('id') for d in dicts: del d['id']