diff options
| author | Anssi Kääriäinen <akaariai@gmail.com> | 2012-04-29 19:48:43 +0300 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-08-16 12:23:05 -0400 |
| commit | bf611f14ec13312aa822beec72c63bd04950613c (patch) | |
| tree | e22a2149ee77f702cc4dc3e368e8de0bab8bade9 | |
| parent | 08e5fcb3e641f7f0af873910117a4951fb2719b7 (diff) | |
[1.4.x] Fixed #20905 -- Fixed an Oracle-specific test case failure
Made a test checking ORM-generated query string case-insensitive.
Backport of ee0a7c741e from master
| -rw-r--r-- | tests/modeltests/prefetch_related/tests.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/modeltests/prefetch_related/tests.py b/tests/modeltests/prefetch_related/tests.py index f48630ad78..7f494febfa 100644 --- a/tests/modeltests/prefetch_related/tests.py +++ b/tests/modeltests/prefetch_related/tests.py @@ -364,7 +364,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()]) |
