def assignment_submissions_dicts() -> Dict[Tuple[str, str], DataFrame]:
        # arrange
        submission1: Dict[str, str] = {
            "id": ID,
            "courseId": COURSE_ID,
            "courseWorkId": COURSEWORK_ID,
        }

        submission2: Dict[str, str] = {
            "id": submission2_id,
            "courseId": COURSE_ID,
            "courseWorkId": coursework2_id,
        }

        submissions_df = DataFrame.from_dict([
            merged_dict(submission1, BOILERPLATE),
            merged_dict(submission2, BOILERPLATE),
        ])
        # act
        return submissions_to_assignment_submissions_dfs(submissions_df)
    def assignments_dict() -> Dict[str, DataFrame]:
        # arrange
        coursework1: Dict[str, str] = {
            "courseId": COURSE_ID,
            "id": ID,
            "title": TITLE,
        }

        coursework2: Dict[str, str] = {
            "courseId": coursework2_course_id,
            "id": ID,
            "title": coursework2_title,
        }

        coursework_df = DataFrame.from_dict([
            merged_dict(coursework1, BOILERPLATE),
            merged_dict(coursework2, BOILERPLATE),
        ])

        # act
        return coursework_to_assignments_dfs(coursework_df)
Beispiel #3
0
    def assignment_submission_dict() -> Dict[Tuple[str, str], DataFrame]:
        # arrange
        submission: Dict[str, str] = {
            "state": CREATED_STATE,
        }

        submissions_df = DataFrame.from_dict(
            [
                merged_dict(submission, BOILERPLATE),
            ]
        )
        # act
        return submissions_to_assignment_submissions_dfs(submissions_df)