Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed some uses of F() expression & and |

Refs #16211
  • Loading branch information...
commit 041ef9ed68722fa5f8c38c9e39fad67714f35014 1 parent f578ee3
@akaariai akaariai authored
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,7 +371,7 @@ 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.")
@@ -379,7 +379,7 @@ def test_delta_invalid_op_and(self):
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.")
Please sign in to comment.
Something went wrong with that request. Please try again.