Source code for q2_cores.EPL.queries.mock_responses

from q2_cores import data_helpers as data


[docs] def mock_demo_response(): return f""" <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:MemberInquiryResponse xmlns="urn:ws:eplinc:com:cgs:common:v1_00" xmlns:ns2="urn:ws:eplinc:com:cgs:v1_00" xmlns:ns3="urn:ws:eplinc:com:cgs:account:v1_00" xmlns:ns4="urn:ws:eplinc:com:cgs:loan:v1_00" xmlns:ns5="urn:ws:eplinc:com:cgs:ach_serv:v1_00" xmlns:ns6="urn:ws:eplinc:com:cgs:ach:v1_00" xmlns:ns7="urn:ws:eplinc:com:cgs:card:v1_00"> <MessageHeader> <InstId>01</InstId> <TraceNum>53273897</TraceNum> </MessageHeader> <hasErrors>false</hasErrors> <ns2:MemberFullName></ns2:MemberFullName> <ns2:MemberFirstName>{data.FIRSTNAME}</ns2:MemberFirstName> <ns2:MemberMiddleName>{data.MIDDLENAME}</ns2:MemberMiddleName> <ns2:MemberLastName>{data.LASTNAME}</ns2:MemberLastName> <ns2:TIN>{data.SOCIALSECURITYWITHHYPHEN}</ns2:TIN> <ns2:BirthDate>{data.DOB.replace("-", "/")}</ns2:BirthDate> <ns2:DeathDate>00/00/0000</ns2:DeathDate> <ns2:USCitizenIndicator>true</ns2:USCitizenIndicator> <ns2:MotherMaidenName>{data.MOTHERSMAIDENNAME}</ns2:MotherMaidenName> <ns2:Address> <AddressType>Home</AddressType> <AddressLine1>{data.ADDRESS1}</AddressLine1> <AddressLine2></AddressLine2> <County>Travis</County> <City>{data.CITY}</City> <State>{data.STATEABBRV}</State> <Country>{data.COUNTRY}</Country> <zip>{data.ZIP}-{data.ZIPCODELAST4}</zip> <ForeignInd>false</ForeignInd> <CountryCode>US</CountryCode> </ns2:Address> <ns2:Address> <AddressType></AddressType> <AddressLine1>{data.ADDRESS1}</AddressLine1> <AddressLine2></AddressLine2> <County>Travis</County> <City>{data.CITY}</City> <State>{data.STATEABBRV}</State> <Country>{data.COUNTRY}</Country> <zip>{data.ZIP}-{data.ZIPCODELAST4}</zip> <ForeignInd>true</ForeignInd> <CountryCode>FR</CountryCode> </ns2:Address> <ns2:Phone> <PhoneNumber>({data.PHONEAREACODE}) {data.PHONEEXCHANGE} {data.PHONESUFFIX}</PhoneNumber> <PhoneType>Home</PhoneType> <PhoneSubType>Landline</PhoneSubType> </ns2:Phone> <ns2:Phone> <PhoneNumber>({data.CELLAREACODE}) {data.CELLEXCHANGE} {data.CELLSUFFIX}</PhoneNumber> <PhoneType>Cell</PhoneType> <PhoneSubType>Mobile</PhoneSubType> </ns2:Phone> <ns2:Phone> <PhoneNumber></PhoneNumber> <PhoneType>Other</PhoneType> <PhoneSubType></PhoneSubType> </ns2:Phone> <ns2:Phone> <PhoneNumber>({data.CELLAREACODE}) {data.CELLEXCHANGE} {data.CELLSUFFIX}</PhoneNumber> <PhoneType>Home</PhoneType> <PhoneSubType>Mobile</PhoneSubType> </ns2:Phone> <ns2:Email> <EmailAddress>{data.EMAIL}</EmailAddress> <EmailType>Home</EmailType> </ns2:Email> </ns2:MemberInquiryResponse> </soap:Body> </soap:Envelope> """.strip()
[docs] def mock_exception_response(): return """ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:MemberInquiryResponse xmlns="urn:ws:eplinc:com:cgs:common:v1_00" xmlns:ns2="urn:ws:eplinc:com:cgs:v1_00" xmlns:ns3="urn:ws:eplinc:com:cgs:account:v1_00" xmlns:ns4="urn:ws:eplinc:com:cgs:loan:v1_00" xmlns:ns5="urn:ws:eplinc:com:cgs:ach_serv:v1_00" xmlns:ns6="urn:ws:eplinc:com:cgs:ach:v1_00" xmlns:ns7="urn:ws:eplinc:com:cgs:card:v1_00"> <MessageHeader> <InstId>01</InstId> <TraceNum>53273897</TraceNum> </MessageHeader> <hasErrors>true</hasErrors> </ns2:MemberInquiryResponse> </soap:Body> </soap:Envelope> """.strip()