Skip to content

Commit

Permalink
[3.0.x] Refs #31312 -- Fixed FTimeDeltaTests.test_date_case_subtracti…
Browse files Browse the repository at this point in the history
…on() test.

Follow up to 16cacdc.
  • Loading branch information
felixxm committed Feb 27, 2020
1 parent 16cacdc commit 94e192a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/expressions/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1439,14 +1439,14 @@ def test_date_case_subtraction(self):
queryset = Experiment.objects.annotate(
date_case=Case(
When(Q(name='e0'), then=F('completed')),
output_field=DateField(),
output_field=models.DateField(),
),
completed_value=Value(
self.e0.completed,
output_field=DateField(),
output_field=models.DateField(),
),
difference=ExpressionWrapper(
F('date_case') - F('completed_value'), output_field=DurationField(),
F('date_case') - F('completed_value'), output_field=models.DurationField(),
),
).filter(difference=datetime.timedelta())
self.assertEqual(queryset.get(), self.e0)
Expand Down

0 comments on commit 94e192a

Please sign in to comment.