src/canvas-extractor/tests/data_generation/enrollments.py
def rollback_loaded_enrollments(enrollments: List[Enrollment]):
    """
    Delete already loaded enrollments via the Canvas API.
    **** Used during testing of the load functionality ****

    Parameters
    ----------
    enrollments: List[Enrollment]
        A list of Enrollment SDK objects from a successful load operation
    """
    logger.info(
        "**** Rolling back %s enrollments via Canvas API - for testing purposes",
        len(enrollments),
    )

    for enrollment in enrollments:
        enrollment.deactivate("delete")

    logger.info("**** Successfully deleted %s enrollments", len(enrollments))

    Delete already loaded enrollments via the Canvas API.
    **** Used during testing of the load functionality ****

    Parameters
    ----------
    enrollments: List[Enrollment]
        A list of Enrollment SDK objects from a successful load operation
    
Delete already loaded enrollments via the Canvas API.
Used during testing of the load functionality

Parameters

List[Enrollment]
A list of Enrollment SDK objects from a successful load operation
Delete already loaded enrollments via the Canvas API . Used during testing of the load functionality Parameters List [ Enrollment ] A list of Enrollment SDK objects from a successful load operation
def rollback_loaded_enrollments(enrollments: List[Enrollment]):
    logger.info(
        "**** Rolling back %s enrollments via Canvas API - for testing purposes",
        len(enrollments),
    )
    for enrollment in enrollments:
        enrollment.deactivate("delete")
    logger.info("**** Successfully deleted %s enrollments", len(enrollments))
def rollback_loaded_enrollments ( enrollments : List [ Enrollment ] ) : logger . info ( "**** Rolling back %s enrollments via Canvas API - for testing purposes" , len ( enrollments ) , ) for enrollment in enrollments : enrollment . deactivate ( "delete" ) logger . info ( "**** Successfully deleted %s enrollments" , len ( enrollments ) )
Delete already loaded enrollments via the Canvas API.
Delete already loaded enrollments via the Canvas API .
"""
    Delete already loaded enrollments via the Canvas API.
    **** Used during testing of the load functionality ****

    Parameters
    ----------
    enrollments: List[Enrollment]
        A list of Enrollment SDK objects from a successful load operation
    """
enrollments
List[Enrollment]