--
Ticket URL: <https://code.djangoproject.com/ticket/26126>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: berker.peksag@… (added)
* owner: nobody => berkerpeksag
* has_patch: 0 => 1
* status: new => assigned
Comment:
Pull request: https://github.com/django/django/pull/6130
Alternative solutions:
* Make assertEqual check less strict: Don't check for the exact return
value of `cookie_date()`.
* Convert assertEqual to assertIn and check if the return value is
`time.time() + 10 + 1` or `time.time() + 10 - 1`. This is simpler than the
first solution.
* Mock `cookie_date()` in `HttpResponseBase.set_cookie()`.
--
Ticket URL: <https://code.djangoproject.com/ticket/26126#comment:1>
* needs_better_patch: 0 => 1
Comment:
As noted on the PR, can `django.test.utils.freeze_time()` help?
--
Ticket URL: <https://code.djangoproject.com/ticket/26126#comment:2>
* needs_better_patch: 1 => 0
Comment:
Yes, `freeze_time()` is a better solution. I've updated the PR to use
`freeze_time()`. Thanks!
--
Ticket URL: <https://code.djangoproject.com/ticket/26126#comment:3>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/26126#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"b17a9150a0c3a132e82b53755ede62a45f897875" b17a9150]:
{{{
#!CommitTicketReference repository=""
revision="b17a9150a0c3a132e82b53755ede62a45f897875"
Fixed #26126 -- Fixed transient failure of test_max_age_expiration
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26126#comment:5>
Comment (by Tim Graham <timograham@…>):
In [changeset:"33b5bb79308c26615f55dc5eef85deb25f741ce2" 33b5bb79]:
{{{
#!CommitTicketReference repository=""
revision="33b5bb79308c26615f55dc5eef85deb25f741ce2"
[1.9.x] Fixed #26126 -- Fixed transient failure of test_max_age_expiration
Backport of b17a9150a0c3a132e82b53755ede62a45f897875 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26126#comment:6>
Comment (by Tim Graham <timograham@…>):
In [changeset:"927f43ea3add3cf92856c447bb021b59b22603df" 927f43ea]:
{{{
#!CommitTicketReference repository=""
revision="927f43ea3add3cf92856c447bb021b59b22603df"
[1.8.x] Fixed #26126 -- Fixed transient failure of test_max_age_expiration
Backport of b17a9150a0c3a132e82b53755ede62a45f897875 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26126#comment:7>