Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.4.x] Fixed #20905 -- Fixed an Oracle-specific test case failure

Made a test checking ORM-generated query string case-insensitive.

Backport of ee0a7c7 from master
  • Loading branch information...
commit bf611f14ec13312aa822beec72c63bd04950613c 1 parent 08e5fcb
@akaariai akaariai authored timgraham committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 tests/modeltests/prefetch_related/tests.py
View
4 tests/modeltests/prefetch_related/tests.py
@@ -364,7 +364,9 @@ def test_child_link_prefetch(self):
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()])
Please sign in to comment.
Something went wrong with that request. Please try again.