Skip to content

Commit

Permalink
feat: add xml pearson vue payload manipulation
Browse files Browse the repository at this point in the history
feat: add xmltodict =)

feat: add xml pearson vue payload manipulation

feat: add tests for utils

style: use some style improvements

feat: add dosctrings go

also styling

fix: flake8 long line in consntant file

feat: use pydantic package

refactor: pydantic to perfom update_dict in xml

fix: duplicate code in payload with some test

feat: pr recommendation keep only main fields

feat: pr recommendation rm username default xml

feat: requirements pydantinc not pinned
  • Loading branch information
johanseto committed May 21, 2024
1 parent 4dc2fe1 commit 5e0fe35
Show file tree
Hide file tree
Showing 6 changed files with 506 additions and 8 deletions.
87 changes: 87 additions & 0 deletions eox_nelp/pearson_vue/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
"""Module to add constants related Pearson Vue Integration"""
# flake8: noqa: E501
# pylint: disable=duplicate-code

PAYLOAD_PING = """
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:sch="http://ws.pearsonvue.com/ping/schema">
<soapenv:Header/>
<soapenv:Body>
<sch:pingServiceRequest/>
</soapenv:Body>
</soapenv:Envelope>
"""

PAYLOAD_PING_DATABASE = """
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:sch="http://ws.pearsonvue.com/ping/schema">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1">
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-28678335">
<wsse:Username></wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"></wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<sch:pingDatabaseRequest />
</soapenv:Body>
</soapenv:Envelope>
"""

PAYLOAD_CDD = """
<soapenv:Envelope xmlns:sch="http://ws.pearsonvue.com/rti/cdd/schema" xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1">
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-26398355">
<wsse:Username></wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"></wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<sch:cddRequest clientCandidateID="" clientID="">
<candidateName>
<firstName></firstName>
<lastName></lastName>
</candidateName>
<webAccountInfo>
<email></email>
</webAccountInfo>
<lastUpdate></lastUpdate>
<primaryAddress>
<address1></address1>
<city></city>
<country></country>
<phone>
<phoneNumber></phoneNumber>
<phoneCountryCode></phoneCountryCode>
</phone>
<mobile>
<mobileNumber></mobileNumber>
<mobileCountryCode></mobileCountryCode>
</mobile>
</primaryAddress>
</sch:cddRequest>
</soapenv:Body>
</soapenv:Envelope>
"""
PAYLOAD_EAD = """
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:sch="http://ws.pearsonvue.com/rti/ead/schema">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1">
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-26398355">
<wsse:Username></wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"></wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<sch:eadRequest clientID="" authorizationTransactionType="">
<examAuthorizationCount></examAuthorizationCount>
<examSeriesCode></examSeriesCode>
<eligibilityApptDateFirst></eligibilityApptDateFirst>
<eligibilityApptDateLast></eligibilityApptDateLast>
<lastUpdate></lastUpdate>
</sch:eadRequest>
</soapenv:Body>
</soapenv:Envelope>
"""
Loading

0 comments on commit 5e0fe35

Please sign in to comment.