def prepare_data_with_new_responsable(): organisation_request = OrganisationRequestFactory( manager=ManagerFactory(is_aidant=False)) for _ in range(2): AidantRequestFactory(organisation=organisation_request) organisation_request.save() return organisation_request
def prepare_data_for_org_with_type_other(): organisation_request = OrganisationRequestFactory( type_id=RequestOriginConstants.OTHER.value, type_other="My other type value", ) for _ in range(3): AidantRequestFactory(organisation=organisation_request) organisation_request.save() return organisation_request
def prepare_data_with_existing_aidant_responsable(): organisation_request = OrganisationRequestFactory( manager=ManagerFactory(is_aidant=False, email="*****@*****.**")) AidantFactory(username="******", can_create_mandats=True) for _ in range(2): AidantRequestFactory(organisation=organisation_request) organisation_request.save() return organisation_request
def prepare_data_with_existing_responsable(): organisation_request = OrganisationRequestFactory() # existing manager AidantFactory( email=organisation_request.manager.email, username=organisation_request.manager.email, can_create_mandats=False, ) for _ in range(3): AidantRequestFactory(organisation=organisation_request) organisation_request.save() return organisation_request
def prepare_data(): OrganisationFactory(data_pass_id=67245456, ) organisation_request = OrganisationRequestFactory( status=RequestStatusConstants.AC_VALIDATION_PROCESSING.name, data_pass_id=67245456, ) organisation_request.manager.is_aidant = True organisation_request.manager.save() for _ in range(3): AidantRequestFactory(organisation=organisation_request) organisation_request.save() return organisation_request
def prepare_data_for_nominal_case(): organisation_request = OrganisationRequestFactory() for _ in range(3): AidantRequestFactory(organisation=organisation_request) organisation_request.save() return organisation_request