183 |
183 |
}
|
184 |
184 |
|
185 |
185 |
DOCUMENTS_ASSOCIATION_RESPONSE = {
|
186 |
|
"nombre_documents": 2,
|
187 |
|
"documents": [
|
|
186 |
"meta": {"nombre_documents": 2, "nombre_documents_deficients": 0},
|
|
187 |
"data": [
|
188 |
188 |
{
|
189 |
|
"type": "Statuts",
|
190 |
|
"url": "https://apientreprise.fr/attestations/40ab0b07d434d0417e8997ce7c5afbef/attestation_document_association.pdf",
|
191 |
|
"timestamp": "1500660325",
|
|
189 |
"data": {
|
|
190 |
"type": "Statuts",
|
|
191 |
"url": "https://apientreprise.fr/attestations/40ab0b07d434d0417e8997ce7c5afbef/attestation_document_association.pdf",
|
|
192 |
"timestamp": "1500660325",
|
|
193 |
},
|
192 |
194 |
},
|
193 |
195 |
{
|
194 |
|
"type": "Récépissé",
|
195 |
|
"url": "https://apientreprise.fr/attestations/40ab0b07d434d0417e8997ce7c5afbef/recepisse_association.pdf",
|
196 |
|
"timestamp": "1500667325",
|
|
196 |
"data": {
|
|
197 |
"type": "Récépissé",
|
|
198 |
"url": "https://apientreprise.fr/attestations/40ab0b07d434d0417e8997ce7c5afbef/recepisse_association.pdf",
|
|
199 |
"timestamp": "1500667325",
|
|
200 |
},
|
197 |
201 |
},
|
198 |
202 |
{
|
199 |
|
"timestamp": "1337158058",
|
200 |
|
"url": "https://apientreprise.fr/attestations/40ab0b07d434d0417e8997ce7c5afbef/attestation_document_association.pdf",
|
201 |
|
"type": "Statuts",
|
|
203 |
"data": {
|
|
204 |
"timestamp": "1337158058",
|
|
205 |
"url": "https://apientreprise.fr/attestations/40ab0b07d434d0417e8997ce7c5afbef/attestation_document_association.pdf",
|
|
206 |
"type": "Statuts",
|
|
207 |
},
|
202 |
208 |
},
|
203 |
209 |
],
|
204 |
210 |
}
|
... | ... | |
446 |
452 |
def test_documents_associations_endpoint(app, resource):
|
447 |
453 |
with responses.RequestsMock() as rsps:
|
448 |
454 |
rsps.get(
|
449 |
|
'https://entreprise.api.gouv.fr/v2/documents_associations/443170139/',
|
|
455 |
'https://entreprise.api.gouv.fr/v3/ministere_interieur/rna/associations/443170139/documents',
|
450 |
456 |
json=DOCUMENTS_ASSOCIATION_RESPONSE,
|
451 |
457 |
)
|
452 |
458 |
|
... | ... | |
465 |
471 |
def test_associations_last_document_of_type_endpoint(app, resource):
|
466 |
472 |
with responses.RequestsMock() as rsps:
|
467 |
473 |
rsps.get(
|
468 |
|
'https://entreprise.api.gouv.fr/v2/documents_associations/443170139/',
|
|
474 |
'https://entreprise.api.gouv.fr/v3/ministere_interieur/rna/associations/443170139/documents',
|
469 |
475 |
json=DOCUMENTS_ASSOCIATION_RESPONSE,
|
470 |
476 |
)
|
471 |
477 |
|
... | ... | |
501 |
507 |
def test_document_association(app, resource, freezer):
|
502 |
508 |
with responses.RequestsMock() as rsps:
|
503 |
509 |
rsps.get(
|
504 |
|
'https://entreprise.api.gouv.fr/v2/documents_associations/443170139/',
|
|
510 |
'https://entreprise.api.gouv.fr/v3/ministere_interieur/rna/associations/443170139/documents',
|
505 |
511 |
json=DOCUMENTS_ASSOCIATION_RESPONSE,
|
506 |
512 |
)
|
507 |
513 |
|
508 |
|
-
|