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