Beispiel #1
0
def get_lapse():
    """Returns a range of dates."""
    now_date = now()
    days = 7
    if settings.TOKEN_EXPIRATION_DAYS:
        days = settings.TOKEN_EXPIRATION_DAYS
    end_date = ago(days=days)

    return now_date, end_date
def now_after_three():
    return dates.ago(days=3)
Beispiel #3
0
 def test_ago():
     timestamp = dates.ago(days=1)
     assert isinstance(timestamp, datetime)