Пример #1
0
def run_loader(arguments: MainArguments) -> None:
    logger.info("Begin loading files into the LMS Data Store (DS)...")

    db_adapter = arguments.get_adapter()
    migrator.migrate(db_adapter, arguments.engine)

    csv_path = arguments.csv_path

    sql_operations = arguments.get_db_operations_adapter()

    _load_users(csv_path, sql_operations)
    _load_sections(csv_path, sql_operations)

    # Important: run this immediately after loading sections, before loading other section-related resources
    _load_section_associations(csv_path, sql_operations)
    _load_assignments(csv_path, sql_operations)
    _load_assignment_submissions(csv_path, sql_operations)
    _load_attendance_events(csv_path, sql_operations)
    _load_section_activities(csv_path, sql_operations)
    _load_system_activities(csv_path, sql_operations)

    logger.info("Done loading files into the LMS Data Store.")
Пример #2
0
 def it_should_set_password_in_the_connection_string(
     fixture: MainArguments, ) -> None:
     # Test the details of the connection string in a more appropriate test
     # suite - test only enough here to prove the point
     assert PASSWORD in str(fixture.get_adapter().engine.url)