Skip to content

Commit

Permalink
Fixed an Oracle-specific test case failure
Browse files Browse the repository at this point in the history
Made a test checking ORM-generated query string case-insensitive.
  • Loading branch information
akaariai committed Apr 29, 2012
1 parent 584e2c0 commit ee0a7c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/modeltests/prefetch_related/tests.py
Expand Up @@ -372,7 +372,9 @@ def test_child_link_prefetch(self):
l = [a.authorwithage for a in Author.objects.prefetch_related('authorwithage')] l = [a.authorwithage for a in Author.objects.prefetch_related('authorwithage')]


# Regression for #18090: the prefetching query must include an IN clause. # 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.assertIn(' IN ', connection.queries[-1]['sql'])


self.assertEqual(l, [a.authorwithage for a in Author.objects.all()]) self.assertEqual(l, [a.authorwithage for a in Author.objects.all()])
Expand Down

0 comments on commit ee0a7c7

Please sign in to comment.