Beispiel #1
0
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
Beispiel #2
0
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
Beispiel #3
0
def student_group_assignment(group, assignment):
    return add_student_group_assignments(
        new_student_group_assignments(1, group, assignment)
    )[0]
Beispiel #4
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]
Beispiel #5
0
def student_group_assignments(groups, assignments):
    return add_student_group_assignments(
        new_student_group_assignments(
            len(groups) * len(assignments), groups, assignments))