Ejemplo n.º 1
0
class EducationOrganizationNetworkAssociationFactory(APIFactory):
    educationOrganizationNetworkReference = factory.Dict(
        dict(educationOrganizationNetworkId=None))  # Must be created
    memberEducationOrganizationReference = factory.Dict(
        dict(educationOrganizationId=LocalEducationAgencyClient.
             shared_education_organization_id()))
    beginDate = formatted_date(1, 1)
    endDate = formatted_date(12, 31)
class RestraintEventFactory(APIFactory):
    restraintEventIdentifier = UniqueIdAttribute(num_chars=20)
    schoolReference = factory.Dict(
        dict(schoolId=SchoolClient.shared_elementary_school_id()))
    studentReference = factory.Dict(
        dict(studentUniqueId=StudentClient.shared_student_id()))
    eventDate = formatted_date(2, 14)
Ejemplo n.º 3
0
class DisciplineActionFactory(APIFactory):
    disciplineActionIdentifier = UniqueIdAttribute(num_chars=20)
    disciplineDate = formatted_date(9, 20)
    disciplines = factory.List([
        factory.Dict(
            dict(disciplineDescriptor=build_descriptor(
                'Discipline', 'Out of School Suspension'))),
    ])
    studentReference = factory.Dict(dict(
        studentUniqueId=111111))  # Default value for scenarios, but not in DB
    actualDisciplineActionLength = 2
    studentDisciplineIncidentAssociations = factory.List([
        factory.Dict(
            dict(
                studentDisciplineIncidentAssociationReference=factory.Dict(
                    dict(
                        incidentIdentifier=None,  # Must be entered by user
                        schoolId=SchoolClient.shared_elementary_school_id(
                        ),  # Prepopulated school
                        studentUniqueId=
                        111111,  # Default value for scenarios, but not in DB
                    )), ), ),
    ])
    responsibilitySchoolReference = factory.Dict(
        dict(schoolId=SchoolClient.shared_elementary_school_id())
    )  # Prepopulated school
Ejemplo n.º 4
0
 def run_association_scenarios(self):
     self.run_scenario(
         'classroomPositionDescriptor',
         build_descriptor('ClassroomPosition', 'Assistant Teacher'))
     self.run_scenario('endDate',
                       formatted_date(9, 1),
                       schoolId=SchoolClient.shared_high_school_id(),
                       courseCode="ALG-2")
    def create_with_dependencies(self, **kwargs):
        # Create a student and section
        student_section_reference = self.assoc_client.create_with_dependencies(
        )
        section_kwargs = {
            'sectionIdentifier':
            student_section_reference['attributes']['sectionReference']
            ['sectionIdentifier'],
            'localCourseCode':
            student_section_reference['attributes']['sectionReference']
            ['localCourseCode'],
            'schoolId':
            student_section_reference['attributes']['sectionReference']
            ['schoolId'],
            'schoolYear':
            student_section_reference['attributes']['sectionReference']
            ['schoolYear'],
            'sessionName':
            student_section_reference['attributes']['sectionReference']
            ['sessionName'],
        }

        # Create gradebook entry
        entry_id, gradebook_entry_title = self.entry_client.create(
            unique_id_field='gradebookEntryTitle',
            sectionReference=section_kwargs)

        # Create student gradebook entry
        entry_attrs = dict(gradebookEntryTitle=gradebook_entry_title,
                           dateAssigned=formatted_date(2, 2),
                           **section_kwargs)

        assoc_attrs = dict(
            studentUniqueId=student_section_reference['attributes']
            ['studentReference']['studentUniqueId'],
            beginDate=formatted_date(8, 23),
            **section_kwargs)

        return self.create_using_dependencies(
            [{
                'assoc_client': student_section_reference
            }, {
                'entry_client': entry_id
            }],
            gradebookEntryReference=entry_attrs,
            studentSectionAssociationReference=assoc_attrs)
class CommunityProviderLicenseFactory(APIFactory):
    licenseIdentifier = UniqueIdAttribute(num_chars=20)
    communityProviderReference = factory.Dict(
        dict(communityProviderId=None))  # Need to create as dependency
    licensingOrganization = "USDOE"
    licenseTypeDescriptor = build_descriptor('LicenseType',
                                             'School Age Program')
    licenseEffectiveDate = formatted_date(11, 24)
Ejemplo n.º 7
0
class BudgetFactory(APIFactory):
    accountReference = factory.Dict(
        dict(
            accountIdentifier=None,  # Must create an account to refer to
            educationOrganizationId=LocalEducationAgencyClient.shared_education_organization_id(),
            fiscalYear=current_year(),
        )
    )
    asOfDate = formatted_date(10, 11)
    amount = 1000.00
class GradebookEntryFactory(APIFactory):
    gradebookEntryTitle = UniqueIdAttribute()
    dateAssigned = formatted_date(2, 2)
    sectionReference = factory.Dict(
        dict(
            localCourseCode="ELA-01",
            schoolId=SchoolClient.shared_elementary_school_id(),
            schoolYear=current_year(),
            sectionIdentifier="ELA012017RM555",
            sessionName="2016-2017 Fall Semester",
        ))
Ejemplo n.º 9
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
Ejemplo n.º 10
0
class EducationOrganizationInterventionPrescriptionAssociationFactory(
        APIFactory):
    educationOrganizationReference = factory.Dict(
        dict(educationOrganizationId=LocalEducationAgencyClient.
             shared_education_organization_id()))
    interventionPrescriptionReference = factory.Dict(
        dict(
            educationOrganizationId=LocalEducationAgencyClient.
            shared_education_organization_id(),
            interventionPrescriptionIdentificationCode=None,  # Must be created
        ))
    beginDate = formatted_date(4, 15)
class CredentialFactory(APIFactory):
    credentialIdentifier = UniqueIdAttribute(num_chars=60)
    stateOfIssueStateAbbreviationDescriptor = build_descriptor(
        'StateAbbreviation', 'TX')
    credentialFieldDescriptor = build_descriptor('CredentialField',
                                                 'Mathematics')
    credentialTypeDescriptor = build_descriptor('CredentialType',
                                                'Registration')
    teachingCredentialDescriptor = build_descriptor('TeachingCredential',
                                                    'Paraprofessional')
    issuanceDate = formatted_date(7, 4)
    gradeLevels = factory.List([
        factory.Dict(
            dict(gradeLevelDescriptor=build_descriptor('GradeLevel',
                                                       'Sixth grade')), ),
    ])
    namespace = "uri://ed-fi.org"
Ejemplo n.º 12
0
class DisciplineIncidentFactory(APIFactory):
    incidentDate = formatted_date(9, 25)
    incidentIdentifier = UniqueIdAttribute(num_chars=20)
    schoolReference = factory.Dict(
        dict(schoolId=SchoolClient.shared_elementary_school_id())
    )  # Prepopulated school
    staffReference = factory.Dict(
        dict(staffUniqueId=None))  # Must be entered by user
    behaviors = factory.List([
        factory.Dict(
            dict(behaviorDescriptor=build_descriptor(
                'Behavior', 'School Code of Conduct')), )
    ])
    incidentLocationDescriptor = build_descriptor('IncidentLocation',
                                                  'School Bus')
    reporterDescriptionDescriptor = build_descriptor('ReporterDescription',
                                                     'Staff')
    reporterName = "Villa, Mike"
class GradeFactory(APIFactory):
    gradeTypeDescriptor = build_descriptor('GradeType', 'Grading Period')
    letterGradeEarned = "B"
    numericGradeEarned = 80
    gradingPeriodReference = factory.Dict(
        dict(
            schoolId=SchoolClient.shared_elementary_school_id(),
            gradingPeriodDescriptor=build_descriptor('GradingPeriod', 'First Six Weeks'),
            periodSequence=1,
            schoolYear=current_year(),
        )
    )
    studentSectionAssociationReference = factory.Dict(
        dict(
            beginDate=formatted_date(8, 23),
            localCourseCode='ELA-01',
            schoolId=SchoolClient.shared_elementary_school_id(),
            schoolYear=current_year(),
            studentUniqueId=1111111,  # Default value for scenarios, but not in DB
            sessionName="2016-2017 Fall Semester",
            sectionIdentifier="ELA012017RM555",
        )
    )
Ejemplo n.º 14
0
class InterventionFactory(APIFactory):
    interventionIdentificationCode = UniqueIdAttribute(num_chars=60)
    educationOrganizationReference = factory.Dict(dict(educationOrganizationId=LocalEducationAgencyClient.shared_education_organization_id()))
    interventionPrescriptions = factory.List([
        factory.Dict(
            dict(
                interventionPrescriptionReference=factory.Dict(
                    dict(
                        interventionPrescriptionIdentificationCode=None,  # Must be created by client
                        educationOrganizationId=LocalEducationAgencyClient.shared_education_organization_id(),
                    ),
                ),
            )
        ),
    ])
    deliveryMethodDescriptor = build_descriptor('DeliveryMethod', 'Whole Class')
    interventionClassDescriptor = build_descriptor('InterventionClass', 'Practice')
    appropriateGradeLevels = factory.List([
        factory.Dict(
            dict(gradeLevelDescriptor=build_descriptor('GradeLevel', 'Ninth grade'))
        )
    ])
    beginDate = formatted_date(8, 23)
Ejemplo n.º 15
0
class FeederSchoolAssociationPipecleanTest(EdFiPipecleanTestBase):
    update_attribute_name = 'beginDate'
    update_attribute_value = formatted_date(7, 4)
Ejemplo n.º 16
0
class InterventionPipecleanTest(EdFiPipecleanTestBase):
    update_attribute_name = 'beginDate'
    update_attribute_value = formatted_date(8, 24)
class StudentEducationOrganizationResponsibilityAssociationPipecleanTest(
        EdFiPipecleanTestBase):
    update_attribute_name = 'endDate'
    update_attribute_value = formatted_date(9, 9)
class StudentSectionAssociationPipecleanTest(EdFiPipecleanTestBase):
    update_attribute_name = 'endDate'
    update_attribute_value = formatted_date(12, 10)

    def get_create_with_dependencies_kwargs(self):
        return dict(schoolId=SchoolClient.shared_elementary_school_id())
class StudentProgramAssociationPipecleanTest(EdFiPipecleanTestBase):
    update_attribute_name = 'endDate'
    update_attribute_value = formatted_date(9, 30)
Ejemplo n.º 20
0
class OpenStaffPositionPipecleanTest(EdFiPipecleanTestBase):
    update_attribute_name = 'datePosted'
    update_attribute_value = formatted_date(3, 31)
class SectionAttendanceTakenEventPipecleanTest(EdFiPipecleanTestBase):
    update_attribute_name = 'eventDate'
    update_attribute_value = formatted_date(8, 8)
Ejemplo n.º 22
0
class CredentialPipecleanTest(EdFiPipecleanTestBase):
    update_attribute_name = 'issuanceDate'
    update_attribute_value = formatted_date(8, 4)
Ejemplo n.º 23
0
class EducationOrganizationNetworkAssociationPipecleanTest(
        EdFiPipecleanTestBase):
    update_attribute_name = 'endDate'
    update_attribute_value = formatted_date(12, 30)
class GradebookEntryPipecleanTest(EdFiPipecleanTestBase):
    update_attribute_name = 'dateAssigned'
    update_attribute_value = formatted_date(3, 3)
class CommunityProviderLicensePipecleanTest(EdFiPipecleanTestBase):
    update_attribute_name = 'licenseEffectiveDate'
    update_attribute_value = formatted_date(12, 24)
Ejemplo n.º 26
0
class FeederSchoolAssociationFactory(APIFactory):
    feederSchoolReference = factory.Dict(
        dict(schoolId=None))  # Must be created
    schoolReference = factory.Dict(dict(schoolId=None))  # Must be created
    beginDate = formatted_date(5, 29)
Ejemplo n.º 27
0
class EducationOrganizationInterventionPrescriptionAssociationPipecleanTest(
        EdFiPipecleanTestBase):
    update_attribute_name = 'beginDate'
    update_attribute_value = formatted_date(4, 20)
class RestraintEventPipecleanTest(EdFiPipecleanTestBase):
    update_attribute_name = 'eventDate'
    update_attribute_value = formatted_date(2, 15)