Browse files

Removed some uses of F() expression & and |

Refs #16211
  • Loading branch information...
1 parent f578ee3 commit 041ef9ed68722fa5f8c38c9e39fad67714f35014 @akaariai akaariai committed Oct 10, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/regressiontests/expressions_regress/tests.py
View
4 tests/regressiontests/expressions_regress/tests.py
@@ -371,15 +371,15 @@ def test_delta_invalid_op_mod(self):
def test_delta_invalid_op_and(self):
raised = False
try:
- r = repr(Experiment.objects.filter(end__lt=F('start')&self.deltas[0]))
+ r = repr(Experiment.objects.filter(end__lt=F('start').bitand(self.deltas[0])))
except TypeError:
raised = True
self.assertTrue(raised, "TypeError not raised on attempt to binary and a datetime with a timedelta.")
def test_delta_invalid_op_or(self):
raised = False
try:
- r = repr(Experiment.objects.filter(end__lt=F('start')|self.deltas[0]))
+ r = repr(Experiment.objects.filter(end__lt=F('start').bitor(self.deltas[0])))
except TypeError:
raised = True
self.assertTrue(raised, "TypeError not raised on attempt to binary or a datetime with a timedelta.")

0 comments on commit 041ef9e

Please sign in to comment.