def test_today_passes_not_in_future(self): """Test VALIDATOR NotInFutureValidator with today date """ form = ProjectReportForm() form.end_date.data = date.today() u = validator.NotInFutureValidator() u(form, form.end_date)
def test_past_date_passes_not_in_future(self): """Test VALIDATOR NotInFutureValidator with past date """ form = ProjectReportForm() form.end_date.data = date.today() - timedelta(days=1) u = validator.NotInFutureValidator() u(form, form.end_date)