def test_expired__expired(group, assignment): student_group_assignment = add_student_group_assignments( new_student_group_assignments(1, group, assignment, due_date=datetime.now(pytz.utc)))[0] assert student_group_assignment.expired
def test_expired__not_expired(group, assignment): student_group_assignment = add_student_group_assignments( new_student_group_assignments( 1, group, assignment, due_date=datetime.now(pytz.utc) + timedelta(days=1), ))[0] assert not student_group_assignment.expired
def student_group_assignment(group, assignment): return add_student_group_assignments( new_student_group_assignments(1, group, assignment) )[0]
def student_group_assignment_all_answers_correct( group, assignment_all_answers_correct ): return add_student_group_assignments( new_student_group_assignments(1, group, assignment_all_answers_correct) )[0]
def student_group_assignments(groups, assignments): return add_student_group_assignments( new_student_group_assignments( len(groups) * len(assignments), groups, assignments))