Skip to content
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...
1 parent 08e5fcb commit bf611f14ec13312aa822beec72c63bd04950613c @akaariai akaariai committed with timgraham
Showing with 3 additions and 1 deletion.
  1. +3 −1 tests/modeltests/prefetch_related/
4 tests/modeltests/prefetch_related/
@@ -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()])

0 comments on commit bf611f1

Please sign in to comment.
Something went wrong with that request. Please try again.