def METHOD_NAME(self, course_dir, mock_get):
    # Patch network calls to retrieve the textbook TOC
    mock_get.return_value.text = dedent("""
        <?xml version="1.0"?><table_of_contents>
        <entry page="5" page_label="ii" name="Table of Contents"/>
        </table_of_contents>
    """).strip()
    root_dir = path(self.temp_dir)
    print(f"Copying test course to temp dir {root_dir}")
    data_dir = path(DATA_DIR)
    shutil.copytree(data_dir / course_dir, root_dir / course_dir)
    print("Starting import")
    initial_import = XMLModuleStore(root_dir, source_dirs=[course_dir], xblock_mixins=(XModuleMixin,))
    courses = initial_import.get_courses()
    assert len(courses) == 1
    initial_course = courses[0]
    # export to the same directory--that way things like the custom_tags/ folder
    # will still be there.
    print("Starting export")
    file_system = OSFS(root_dir)
    initial_course.runtime.export_fs = file_system.makedir(course_dir, recreate=True)
    root = lxml.etree.Element('root')
    initial_course.add_xml_to_node(root)
    with initial_course.runtime.export_fs.open('course.xml', 'wb') as course_xml:
        lxml.etree.ElementTree(root).write(course_xml, encoding='utf-8')
    print("Starting second import")
    second_import = XMLModuleStore(root_dir, source_dirs=[course_dir], xblock_mixins=(XModuleMixin,))
    courses2 = second_import.get_courses()
    assert len(courses2) == 1
    exported_course = courses2[0]
    print("Checking course equality")
    # HACK: filenames change when changing file formats
    # during imports from old-style courses.  Ignore them.
    strip_filenames(initial_course)
    strip_filenames(exported_course)
    assert blocks_are_equivalent(initial_course, exported_course)
    assert initial_course.id == exported_course.id
    course_id = initial_course.id
    print("Checking key equality")
    self.assertCountEqual(
        list(initial_import.modules[course_id].keys()),
        list(second_import.modules[course_id].keys())
    )
    print("Checking block equality")
    for location in initial_import.modules[course_id].keys():
        print(("Checking", location))
        assert blocks_are_equivalent(initial_import.modules[course_id][location],
                                     second_import.modules[course_id][location])