class StaffAbsenceEventFactory(APIFactory):
    absenceEventCategoryDescriptor = build_descriptor('AbsenceEventCategory',
                                                      'Vacation')
    eventDate = RandomDateAttribute()
    staffReference = factory.Dict(
        dict(staffUniqueId=StaffClient.shared_staff_id()))
    absenceEventReason = "Vacationing in Hawai'i"
class StaffLeaveFactory(APIFactory):
    staffReference = factory.Dict(
        dict(staffUniqueId=StaffClient.shared_staff_id())
    )  # Prepopulated staff record
    staffLeaveEventCategoryDescriptor = build_descriptor(
        'StaffLeaveEventCategory', 'Bereavement')
    beginDate = RandomDateAttribute()
    reason = "Family emergency"
class StaffEducationOrganizationContactAssociationFactory(APIFactory):
    contactTitle = UniqueIdAttribute(num_chars=75)
    staffReference = factory.Dict(
        dict(staffUniqueId=StaffClient.shared_staff_id())
    )  # Prepopulated staff record
    educationOrganizationReference = factory.Dict(
        dict(educationOrganizationId=SchoolClient.shared_elementary_school_id(
        )))  # Prepopulated school
    electronicMailAddress = '*****@*****.**'
class StaffEducationOrganizationEmploymentAssociationFactory(APIFactory):
    employmentStatusDescriptor = build_descriptor('EmploymentStatus',
                                                  'Substitute/temporary')
    staffReference = factory.Dict(
        dict(staffUniqueId=StaffClient.shared_staff_id())
    )  # Prepopulated staff record
    educationOrganizationReference = factory.Dict(
        dict(educationOrganizationId=SchoolClient.shared_elementary_school_id(
        )))  # Prepopulated school
    hireDate = RandomDateAttribute()
    hourlyWage = 20.0
Ejemplo n.º 5
0
class PayrollFactory(APIFactory):
    accountReference = factory.Dict(
        dict(
            accountIdentifier=None,  # Must create an account to refer to
            educationOrganizationId=LocalEducationAgencyClient.shared_education_organization_id(),
            fiscalYear=current_year(),
        )
    )
    staffReference = factory.Dict(dict(staffUniqueId=StaffClient.shared_staff_id()))  # Prepopulated staff
    asOfDate = formatted_date(12, 27)
    amountToDate = 271.83
class StaffProgramAssociationFactory(APIFactory):
    beginDate = RandomDateAttribute()
    staffReference = factory.Dict(
        dict(staffUniqueId=StaffClient.shared_staff_id())
    )  # Prepopulated staff record
    programReference = factory.Dict(
        dict(
            educationOrganizationId=LocalEducationAgencyClient.
            shared_education_organization_id(),
            programName=ProgramClient.shared_program_name(),
            programTypeDescriptor=build_descriptor(
                'ProgramType', ProgramClient.shared_program_name()),
        ))  # Prepopulated program
    studentRecordAccess = True
class StaffSectionAssociationFactory(APIFactory):
    sectionReference = factory.Dict(
        dict(
            localCourseCode="ELA-01",
            schoolId=SchoolClient.shared_elementary_school_id(),
            schoolYear=current_year(),
            sectionIdentifier="ELA012017RM555",
            sessionName="2016-2017 Fall Semester",
        ))
    staffReference = factory.Dict(
        dict(staffUniqueId=StaffClient.shared_staff_id())
    )  # Prepopulated staff record
    classroomPositionDescriptor = build_descriptor('ClassroomPosition',
                                                   'Teacher of Record')
    beginDate = formatted_date(8, 31)
class StaffSchoolAssociationFactory(APIFactory):
    staffReference = factory.Dict(
        dict(staffUniqueId=StaffClient.shared_staff_id())
    )  # Prepopulated staff record
    schoolReference = factory.Dict(
        dict(schoolId=SchoolClient.shared_elementary_school_id())
    )  # Prepopulated school record
    academicSubjects = factory.List([
        dict(academicSubjectDescriptor=build_descriptor(
            'AcademicSubject', 'English Language Arts')),
    ])
    gradeLevels = factory.List(
        [])  # Default grade levels are blank for scenario
    programAssignmentDescriptor = build_descriptor(
        'ProgramAssignment', 'Other')  # Required despite "optional" in docs