def test_create_application_info_creates_application_info_when_data_is_valid(self):
self.start_date = timezone.now().date() + timezone.timedelta(days=1)
self.end_date = timezone.now().date() + timezone.timedelta(days=2)
self.start_interview_date = timezone.now().date() + timezone.timedelta(days=1)
self.end_interview_date = timezone.now().date() + timezone.timedelta(days=2)
current_app_info_count = ApplicationInfo.objects.count()
create_application_info(start_date=self.start_date,
end_date=self.end_date,
course=self.course,
start_interview_date=self.start_interview_date,
end_interview_date=self.end_interview_date)
self.assertEqual(current_app_info_count + 1, ApplicationInfo.objects.count())
评论列表
文章目录