diff options
| author | Anssi Kääriäinen <akaariai@gmail.com> | 2013-03-24 22:59:44 +0200 |
|---|---|---|
| committer | Anssi Kääriäinen <akaariai@gmail.com> | 2013-03-26 14:19:54 +0200 |
| commit | e17fa9e877e84e93b699c2bd13ea48dbbb86e451 (patch) | |
| tree | 1481fb6e113e01d014634e4c84d264fa8fd40b83 /tests | |
| parent | a4b8a4b632dbb6d9fed1a8654aed99a9c53560d4 (diff) | |
Fixed #20091 -- Oracle null promotion for empty strings
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/queries/tests.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/queries/tests.py b/tests/queries/tests.py index 806648aa54..cdc26248c9 100644 --- a/tests/queries/tests.py +++ b/tests/queries/tests.py @@ -1785,7 +1785,6 @@ class Queries6Tests(TestCase): # Nested queries are possible (although should be used with care, since # they have performance problems on backends like MySQL. - self.assertQuerysetEqual( Annotation.objects.filter(notes__in=Note.objects.filter(note="n1")), ['<Annotation: a1>'] @@ -2824,3 +2823,11 @@ class Ticket20101Tests(TestCase): self.assertTrue(n in qs1) self.assertFalse(n in qs2) self.assertTrue(n in (qs1 | qs2)) + +class EmptyStringPromotionTests(TestCase): + def test_empty_string_promotion(self): + qs = RelatedObject.objects.filter(single__name='') + if connection.features.interprets_empty_strings_as_nulls: + self.assertIn('LEFT OUTER JOIN', str(qs.query)) + else: + self.assertNotIn('LEFT OUTER JOIN', str(qs.query)) |
