'Ensure we can use the token after n days, but no greater.'

def test_timeout(self):

    class Mocked(PasswordResetTokenGenerator, ):
        def __init__(self, today):
            self._today_val = today
        def _today(self):
            return self._today_val
    user = User.objects.create_user('tokentestuser', 'test2@example.com', 'testpw')
    p0 = PasswordResetTokenGenerator()
    tk1 = p0.make_token(user)
    p1 = Mocked((date.today() + timedelta(settings.PASSWORD_RESET_TIMEOUT_DAYS)))
    self.assertTrue(p1.check_token(user, tk1))
    p2 = Mocked((date.today() + timedelta((settings.PASSWORD_RESET_TIMEOUT_DAYS + 1))))
    self.assertFalse(p2.check_token(user, tk1))
