Mock remote census responses in tests using XML

By using real XML responses developers will be able to understand better
how the integration works (the data flow), and the correspondency between
`remote_census` settings and their place at a real XML response.

As `stubbed_responses` methods were removed from the model layer now the
stubbing part should be managed from the test environment code so also
added a new helper module `RemoteCensusSetup` that can be used anywhere
where we need to call the web service.

Co-Authored-By: Javi Martín <javim@elretirao.net>
This commit is contained in:
Senén Rodero Rodríguez
2020-10-30 11:16:48 +01:00
committed by Javi Martín
parent 8257a82f2f
commit ac6260a2ef
14 changed files with 185 additions and 209 deletions

View File

@@ -0,0 +1,8 @@
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<s:Body>
<response>
<data>
</data>
</response>
</s:Body>
</s:Envelope>

View File

@@ -0,0 +1,15 @@
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<s:Body>
<response>
<data>
<date_of_birth>31/12/1980</date_of_birth>
<document_number>12345678Z</document_number>
<gender>Male</gender>
<name>William</name>
<surname>Widmore</surname>
<postal_code>28013</postal_code>
<district_code>01</district_code>
</data>
</response>
</s:Body>
</s:Envelope>