Fakultas Ilmu Komputer UI

Commit 907741ad authored by Ahmad Fauzan Amirul Isnain's avatar Ahmad Fauzan Amirul Isnain
Browse files

[RED] Create tests form valid when data valid

parent c95ef47c
Pipeline #60081 passed with stages
in 28 minutes and 14 seconds
......@@ -1699,3 +1699,12 @@ class PeriodFormTests(TestCase):
form["end_date"].errors,
['waktu selesai sebelum waktu mulai']
)
def test_form_valid_when_data_valid(self):
current_time = datetime.now()
data = {
'start_date': current_time - timedelta(days = 1),
'end_date': current_time,
}
form = PeriodForm(data)
self.assertTrue(form.is_valid())
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment