Example #1
0
def test_not_in_future_datetime_future():
    with pytest.raises(ValidationError):
        not_in_future(datetime.now() + timedelta(days=1))
Example #2
0
def test_not_in_future_datetime_present():
    not_in_future(datetime.now())
Example #3
0
def test_not_in_future_datetime_past():
    not_in_future(datetime.now() - timedelta(days=1))
Example #4
0
def test_not_in_future_date_future():
    with pytest.raises(ValidationError):
        # Tomorrow
        not_in_future(date.today() + timedelta(days=1))
Example #5
0
def test_not_in_future_date_present():
    not_in_future(date.today())
Example #6
0
def test_not_in_future_date_past():
    not_in_future(date.today() - timedelta(days=1))