def test_write_ead_file(self):
"""
Tests that write_ead_file outputs correctly
"""
kwargs = {
'id': 143,
'operation': 'add',
'exam_run__exam_series_code': 'MM-DEDP',
'exam_run__date_first_eligible': date(2016, 5, 15),
'exam_run__date_last_eligible': date(2016, 10, 15),
}
with mute_signals(post_save):
profile = ProfileFactory(id=14879)
exam_auths = [ExamAuthorizationFactory.create(user=profile.user, **kwargs)]
exam_auths[0].updated_on = FIXED_DATETIME
self.ead_writer.write(self.tsv_file, exam_auths)
assert self.tsv_rows[0] == (
"add\t143\t"
"14879\tMM-DEDP\t\t"
"\t2016/05/15\t2016/10/15\t" # accommodation blank intentionally
"2016/05/15 15:02:55"
)
评论列表
文章目录