Re: Django tests and token timeout

2018-07-30 Thread Birger Schacht
Hi! On 07/30/2018 05:04 PM, Kasper Laudrup wrote: > Hi Birger, > > On 2018-07-30 16:12, Birger Schacht wrote: >> i'm using my own PasswordResetTokenGenerator which has a timeout that is >> not given in days but hours, to make the password token timeout more >> fine grained. Is there a way to test

Re: Django tests and token timeout

2018-07-30 Thread Kasper Laudrup
Hi Birger, On 2018-07-30 16:12, Birger Schacht wrote: i'm using my own PasswordResetTokenGenerator which has a timeout that is not given in days but hours, to make the password token timeout more fine grained. Is there a way to test such a timeout in Django tests, i.e. something that lets the un

Re: Django tests and token timeout

2018-07-30 Thread Adam Stein
Whenever I need to set the date or datetime to something specific for unit tests, I use Forbidden Fruit (https://github.com/clarete/forbidden fruit). id="-x-evo-selection-start-marker"> On Mon, 2018-07-30 at 16:12 +0200, Birger Schacht wrote: > hi, > > i'm using my own PasswordResetTokenGenerator

Django tests and token timeout

2018-07-30 Thread Birger Schacht
hi, i'm using my own PasswordResetTokenGenerator which has a timeout that is not given in days but hours, to make the password token timeout more fine grained. Is there a way to test such a timeout in Django tests, i.e. something that lets the unit test use a fake time in the future? cheers, Birg