from q2_cores import data_helpers
[docs]
def mock_build_demographic_info_response():
response = f"""
<Summit xmlns="http://summit.fiserv.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RealTime>
<CommandRs>
<ResponseHeader>
<Status>
<StatusCode>00</StatusCode>
<StatusDesc>SUCCESSFUL</StatusDesc>
</Status>
</ResponseHeader>
<RQMS_RQSTRs>
<MemberResults>
<Identifier>M</Identifier>
<Length>0975</Length>
<Account>0001234567</Account>
<MemberName>{data_helpers.FULLNAME}</MemberName>
<JointHolderName>{data_helpers.FULLNAME} Jr</JointHolderName>
<AddressLine1>{data_helpers.ADDRESS1}</AddressLine1>
<AddressLine2>{data_helpers.ADDRESS2}</AddressLine2>
<AddressLine3/>
<City>{data_helpers.CITY}</City>
<State>{data_helpers.STATE}</State>
<ZipCode>{data_helpers.ZIP}</ZipCode>
<SSN>{data_helpers.SOCIALSECURITY}</SSN>
<PhoneAC>{data_helpers.PHONEAREACODE}</PhoneAC>
<Phone>{data_helpers.PHONENUMBERNOAREACODE}</Phone>
<MemberRestrictiveFlag>0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0</MemberRestrictiveFlag>
<Sex/>
<CountryCode>US</CountryCode>
<WorkPhoneAC>{data_helpers.WORKAREACODE}</WorkPhoneAC>
<WorkPhone>{data_helpers.WORKPHONENOAREACODE}</WorkPhone>
<FaxPhoneAC/>
<FaxPhone/>
<BirthDate>19880723</BirthDate>
<Email>{data_helpers.EMAIL}</Email>
<TwoDigitBranchID>15</TwoDigitBranchID>
<UserDt>00000000</UserDt>
<ProxyDt>00000000</ProxyDt>
<DriverLicenseNum>{data_helpers.DRIVERSLICENSENUM}</DriverLicenseNum>
<DriverLicenseState>{data_helpers.DRIVERSLICENSESTATEABBREV}</DriverLicenseState>
<EmployeeDept>COMMUNITY</EmployeeDept>
<EmployeeNum/>
<RefField1/>
<RefField2/>
<RefField3/>
<RefField4/>
<PINChangeDt>00000000</PINChangeDt>
<MaidenName/>
<WorkPhoneExt>{data_helpers.WORKEXTENSION}</WorkPhoneExt>
<InternetEnableDt/>
<LastStatementDt>20180930</LastStatementDt>
<LastChangeDt>20181102</LastChangeDt>
<BranchID>0015</BranchID>
<Password/>
<OpenDt>20180208</OpenDt>
</MemberResults>
<ShareResults>
<Identifier>S</Identifier>
<Length>0446</Length>
<Suffix>00</Suffix>
<ACC>01</ACC>
<ShareDesc>PRIMARY SHARE/SAVING</ShareDesc>
<AcctBal>000000500</AcctBal>
<AvailableBal>000000000</AvailableBal>
<LastDividendPaid>000000000</LastDividendPaid>
<Rate>000000</Rate>
<MaturityDt>000000</MaturityDt>
<LastRenewalDt>180209</LastRenewalDt>
<ShareRestrictiveFlags>0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0</ShareRestrictiveFlags>
<ShareDescAbbr>PSA</ShareDescAbbr>
<YTDDividends>000000000</YTDDividends>
<PriorYTDDividends>000000000</PriorYTDDividends>
<CurrentIRAMaxContribution>000000000</CurrentIRAMaxContribution>
<PriorIRAMaxcontribution>000000000</PriorIRAMaxcontribution>
<CurrentYearIRAContributions>000000000</CurrentYearIRAContributions>
<PriorYearIRAContributions>000000000</PriorYearIRAContributions>
<LastDt>20180831</LastDt>
<LastInternetTransaction/>
<LastDividendDt>20180209</LastDividendDt>
<OpenDt>20180208</OpenDt>
<OpenAmt>000000500</OpenAmt>
<TwoDigitBranchID>15</TwoDigitBranchID>
<DividendDisposition>0</DividendDisposition>
<TransferType/>
<TransferAccts>000000000000000000000000000000000000000000000000000000000000000000000000
</TransferAccts>
<TransferSfxs>0000000000000000</TransferSfxs>
<LastStatementDt>00000000</LastStatementDt>
<MICRNum/>
<PreviousMICRNum/>
<DraftAcct>000000000</DraftAcct>
<DividendLastAPYE>000000</DividendLastAPYE>
<BranchID>0015</BranchID>
<RegDWithdrawalsMTD/>
<RegDChecksMTD/>
</ShareResults>
<ShareResults>
<Identifier>S</Identifier>
<Length>0446</Length>
<Suffix>80</Suffix>
<ACC>08</ACC>
<ShareDesc>CHECKING ACCOUNT</ShareDesc>
<AcctBal>000009939</AcctBal>
<AvailableBal>000009939</AvailableBal>
<LastDividendPaid>000000000</LastDividendPaid>
<Rate>000000</Rate>
<MaturityDt>000000</MaturityDt>
<LastRenewalDt>180209</LastRenewalDt>
<ShareRestrictiveFlags>0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0</ShareRestrictiveFlags>
<ShareDescAbbr>SDA</ShareDescAbbr>
<YTDDividends>000000000</YTDDividends>
<PriorYTDDividends>000000000</PriorYTDDividends>
<CurrentIRAMaxContribution>000000000</CurrentIRAMaxContribution>
<PriorIRAMaxcontribution>000000000</PriorIRAMaxcontribution>
<CurrentYearIRAContributions>000000000</CurrentYearIRAContributions>
<PriorYearIRAContributions>000000000</PriorYearIRAContributions>
<LastDt>20181031</LastDt>
<LastInternetTransaction/>
<LastDividendDt>20180209</LastDividendDt>
<OpenDt>20180208</OpenDt>
<OpenAmt>000002000</OpenAmt>
<TwoDigitBranchID>15</TwoDigitBranchID>
<DividendDisposition>1</DividendDisposition>
<TransferType>S</TransferType>
<TransferAccts>000236425000000000000000000000000000000000000000000000000000000000000000
</TransferAccts>
<TransferSfxs>0000000000000000</TransferSfxs>
<LastStatementDt>00000000</LastStatementDt>
<MICRNum/>
<PreviousMICRNum/>
<DraftAcct>000236425</DraftAcct>
<DividendLastAPYE>000000</DividendLastAPYE>
<BranchID>0015</BranchID>
<RegDWithdrawalsMTD/>
<RegDChecksMTD/>
</ShareResults>
</RQMS_RQSTRs>
</CommandRs>
</RealTime>
</Summit>
"""
return data_helpers.normalize_xml_str(response)
[docs]
def mock_build_demographic_info_bad_response():
response = """
<Summit xmlns="http://summit.fiserv.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RealTime>
<CommandRs>
<ResponseHeader>
<Status>
<StatusCode>01</StatusCode>
<StatusDesc>ERROR</StatusDesc>
</Status>
</ResponseHeader>
</CommandRs>
</RealTime>
</Summit>
"""
return data_helpers.normalize_xml_str(response)