From ee0a7c741e98214bac7eeb60b848cf099ff28836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anssi=20K=C3=A4=C3=A4ri=C3=A4inen?= Date: Sun, 29 Apr 2012 19:48:43 +0300 Subject: [PATCH] Fixed an Oracle-specific test case failure Made a test checking ORM-generated query string case-insensitive. --- tests/modeltests/prefetch_related/tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/modeltests/prefetch_related/tests.py b/tests/modeltests/prefetch_related/tests.py index c15294af1d..51a9b698f6 100644 --- a/tests/modeltests/prefetch_related/tests.py +++ b/tests/modeltests/prefetch_related/tests.py @@ -372,7 +372,9 @@ class MultiTableInheritanceTest(TestCase): l = [a.authorwithage for a in Author.objects.prefetch_related('authorwithage')] # Regression for #18090: the prefetching query must include an IN clause. - self.assertIn('authorwithage', connection.queries[-1]['sql']) + # Note that on Oracle the table name is upper case in the generated SQL, + # thus the .lower() call. + self.assertIn('authorwithage', connection.queries[-1]['sql'].lower()) self.assertIn(' IN ', connection.queries[-1]['sql']) self.assertEqual(l, [a.authorwithage for a in Author.objects.all()])