diff options
| author | Anssi Kääriäinen <akaariai@gmail.com> | 2012-07-01 22:49:38 +0300 |
|---|---|---|
| committer | Anssi Kääriäinen <akaariai@gmail.com> | 2012-07-01 22:52:35 +0300 |
| commit | e74787391e8fdf87d9a92138028911746809bd7c (patch) | |
| tree | 55d069782efb40088a9bcf9c34b4d486a9733ed6 /tests | |
| parent | f572ee0c65ec5eac9edb0cb3e35c96ec86d89ffb (diff) | |
Fixed a regression introduced in where.as_sql() refactor
At least Oracle needs parentheses in negated where conditions, even if
there is only single condition negated. Fixed this by reverting to old
logic in that part of as_sql() and adding a comment about this.
I did not investigate why the parentheses are needed. The original
offending commit was bd283aa844b04651b7c8b4e85f48c6dced1678f0.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/queries/tests.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/regressiontests/queries/tests.py b/tests/regressiontests/queries/tests.py index 3d2aafd2d9..9bb3a29430 100644 --- a/tests/regressiontests/queries/tests.py +++ b/tests/regressiontests/queries/tests.py @@ -2091,7 +2091,7 @@ class WhereNodeTest(TestCase): w = WhereNode(children=[NothingNode(), self.DummyNode()], connector='OR') self.assertEquals(w.as_sql(qn, connection), ('dummy', [])) w.negate() - self.assertEquals(w.as_sql(qn, connection), ('NOT dummy', [])) + self.assertEquals(w.as_sql(qn, connection), ('NOT (dummy)', [])) def test_empty_nodes(self): qn = connection.ops.quote_name |
