0002-toulouse-maelis-add-document-referential-72532.patch
functests/toulouse_maelis/data/test_read_document_list.json | ||
---|---|---|
1 |
[ |
|
2 |
{ |
|
3 |
"id": "43", |
|
4 |
"code": "43", |
|
5 |
"rang": "FAMILY", |
|
6 |
"text": "Acte notari\u00e9 de divorce", |
|
7 |
"label": "Acte notari\u00e9 de divorce" |
|
8 |
}, |
|
9 |
{ |
|
10 |
"id": "44", |
|
11 |
"code": "44", |
|
12 |
"rang": "PERSON", |
|
13 |
"text": "Attestation aide m\u00e9dicale de l'\u00e9tat CPAM", |
|
14 |
"label": "Attestation aide m\u00e9dicale de l'\u00e9tat CPAM" |
|
15 |
}, |
|
16 |
{ |
|
17 |
"id": "45", |
|
18 |
"code": "45", |
|
19 |
"rang": "FAMILY", |
|
20 |
"text": "Attestation CAF", |
|
21 |
"label": "Attestation CAF" |
|
22 |
}, |
|
23 |
{ |
|
24 |
"id": "46", |
|
25 |
"code": "46", |
|
26 |
"rang": "FAMILY", |
|
27 |
"text": "Attestation CD31", |
|
28 |
"label": "Attestation CD31" |
|
29 |
}, |
|
30 |
{ |
|
31 |
"id": "47", |
|
32 |
"code": "47", |
|
33 |
"rang": "FAMILY", |
|
34 |
"text": "Attestation d'attribution ou non de bourse", |
|
35 |
"label": "Attestation d'attribution ou non de bourse" |
|
36 |
}, |
|
37 |
{ |
|
38 |
"id": "49", |
|
39 |
"code": "49", |
|
40 |
"rang": "FAMILY", |
|
41 |
"text": "Attestation de paiement Office fran\u00e7ais de l'immigration et int\u00e9gration", |
|
42 |
"label": "Attestation de paiement Office fran\u00e7ais de l'immigration et int\u00e9gration" |
|
43 |
}, |
|
44 |
{ |
|
45 |
"id": "50", |
|
46 |
"code": "50", |
|
47 |
"rang": "FAMILY", |
|
48 |
"text": "Attestation de paiement P\u00f4le emploi", |
|
49 |
"label": "Attestation de paiement P\u00f4le emploi" |
|
50 |
}, |
|
51 |
{ |
|
52 |
"id": "81", |
|
53 |
"code": "81", |
|
54 |
"rang": "FAMILY", |
|
55 |
"text": "Attestation d'h\u00e9bergement d'une personne physique", |
|
56 |
"label": "Attestation d'h\u00e9bergement d'une personne physique" |
|
57 |
}, |
|
58 |
{ |
|
59 |
"id": "55", |
|
60 |
"code": "55", |
|
61 |
"rang": "FAMILY", |
|
62 |
"text": "Attestation d'inscription au registre du Commerce et des M\u00e9tiers - Kbis", |
|
63 |
"label": "Attestation d'inscription au registre du Commerce et des M\u00e9tiers - Kbis" |
|
64 |
}, |
|
65 |
{ |
|
66 |
"id": "52", |
|
67 |
"code": "52", |
|
68 |
"rang": "FAMILY", |
|
69 |
"text": "Attestation h\u00e9bergement organismes tiers", |
|
70 |
"label": "Attestation h\u00e9bergement organismes tiers" |
|
71 |
}, |
|
72 |
{ |
|
73 |
"id": "53", |
|
74 |
"code": "53", |
|
75 |
"rang": "FAMILY", |
|
76 |
"text": "Attestation indemn. arr\u00eat maladie CPAM", |
|
77 |
"label": "Attestation indemn. arr\u00eat maladie CPAM" |
|
78 |
}, |
|
79 |
{ |
|
80 |
"id": "54", |
|
81 |
"code": "54", |
|
82 |
"rang": "FAMILY", |
|
83 |
"text": "Attestation indemn. P\u00f4le emploi", |
|
84 |
"label": "Attestation indemn. P\u00f4le emploi" |
|
85 |
}, |
|
86 |
{ |
|
87 |
"id": "56", |
|
88 |
"code": "56", |
|
89 |
"rang": "FAMILY", |
|
90 |
"text": "Attestation organismes associatifs", |
|
91 |
"label": "Attestation organismes associatifs" |
|
92 |
}, |
|
93 |
{ |
|
94 |
"id": "48", |
|
95 |
"code": "48", |
|
96 |
"rang": "FAMILY", |
|
97 |
"text": "Attestation paiement CPAM", |
|
98 |
"label": "Attestation paiement CPAM" |
|
99 |
}, |
|
100 |
{ |
|
101 |
"id": "51", |
|
102 |
"code": "51", |
|
103 |
"rang": "FAMILY", |
|
104 |
"text": "Attestation prise en charge Maison d'enfants", |
|
105 |
"label": "Attestation prise en charge Maison d'enfants" |
|
106 |
}, |
|
107 |
{ |
|
108 |
"id": "83", |
|
109 |
"code": "83", |
|
110 |
"rang": "PERSON", |
|
111 |
"text": "Attestation responsabilit\u00e9 civile", |
|
112 |
"label": "Attestation responsabilit\u00e9 civile" |
|
113 |
}, |
|
114 |
{ |
|
115 |
"id": "57", |
|
116 |
"code": "57", |
|
117 |
"rang": "FAMILY", |
|
118 |
"text": "Attestation travailleur social", |
|
119 |
"label": "Attestation travailleur social" |
|
120 |
}, |
|
121 |
{ |
|
122 |
"id": "69", |
|
123 |
"code": "69", |
|
124 |
"rang": "PERSON", |
|
125 |
"text": "Autorisation de sortie du territoire", |
|
126 |
"label": "Autorisation de sortie du territoire" |
|
127 |
}, |
|
128 |
{ |
|
129 |
"id": "42", |
|
130 |
"code": "42", |
|
131 |
"rang": "PERSON", |
|
132 |
"text": "Autre document utile \u00e0 la d\u00e9rogation", |
|
133 |
"label": "Autre document utile \u00e0 la d\u00e9rogation" |
|
134 |
}, |
|
135 |
{ |
|
136 |
"id": "58", |
|
137 |
"code": "58", |
|
138 |
"rang": "FAMILY", |
|
139 |
"text": "Avis d'imposition / non imposition", |
|
140 |
"label": "Avis d'imposition / non imposition" |
|
141 |
}, |
|
142 |
{ |
|
143 |
"id": "59", |
|
144 |
"code": "59", |
|
145 |
"rang": "FAMILY", |
|
146 |
"text": "Bilan comptable", |
|
147 |
"label": "Bilan comptable" |
|
148 |
}, |
|
149 |
{ |
|
150 |
"id": "60", |
|
151 |
"code": "60", |
|
152 |
"rang": "FAMILY", |
|
153 |
"text": "Bulletin de salaire", |
|
154 |
"label": "Bulletin de salaire" |
|
155 |
}, |
|
156 |
{ |
|
157 |
"id": "61", |
|
158 |
"code": "61", |
|
159 |
"rang": "FAMILY", |
|
160 |
"text": "Carte \u00e9tudiant", |
|
161 |
"label": "Carte \u00e9tudiant" |
|
162 |
}, |
|
163 |
{ |
|
164 |
"id": "68", |
|
165 |
"code": "68", |
|
166 |
"rang": "PERSON", |
|
167 |
"text": "Carte mutuelle ou CMU", |
|
168 |
"label": "Carte mutuelle ou CMU" |
|
169 |
}, |
|
170 |
{ |
|
171 |
"id": "70", |
|
172 |
"code": "70", |
|
173 |
"rang": "PERSON", |
|
174 |
"text": "Carte nationnale d'identit\u00e9", |
|
175 |
"label": "Carte nationnale d'identit\u00e9" |
|
176 |
}, |
|
177 |
{ |
|
178 |
"id": "71", |
|
179 |
"code": "71", |
|
180 |
"rang": "FAMILY", |
|
181 |
"text": "Certificat de PACS", |
|
182 |
"label": "Certificat de PACS" |
|
183 |
}, |
|
184 |
{ |
|
185 |
"id": "73", |
|
186 |
"code": "73", |
|
187 |
"rang": "PERSON", |
|
188 |
"text": "Certificat de scolarit\u00e9", |
|
189 |
"label": "Certificat de scolarit\u00e9" |
|
190 |
}, |
|
191 |
{ |
|
192 |
"id": "74", |
|
193 |
"code": "74", |
|
194 |
"rang": "PERSON", |
|
195 |
"text": "Copie carte de s\u00e9jour", |
|
196 |
"label": "Copie carte de s\u00e9jour" |
|
197 |
}, |
|
198 |
{ |
|
199 |
"id": "38", |
|
200 |
"code": "38", |
|
201 |
"rang": "PERSON", |
|
202 |
"text": "Copie pages de vaccination", |
|
203 |
"label": "Copie pages de vaccination" |
|
204 |
}, |
|
205 |
{ |
|
206 |
"id": "62", |
|
207 |
"code": "62", |
|
208 |
"rang": "PERSON", |
|
209 |
"text": "Copie passeport", |
|
210 |
"label": "Copie passeport" |
|
211 |
}, |
|
212 |
{ |
|
213 |
"id": "75", |
|
214 |
"code": "75", |
|
215 |
"rang": "PERSON", |
|
216 |
"text": "Courrier ou mail famille re\u00e7u", |
|
217 |
"label": "Courrier ou mail famille re\u00e7u" |
|
218 |
}, |
|
219 |
{ |
|
220 |
"id": "37", |
|
221 |
"code": "37", |
|
222 |
"rang": "FAMILY", |
|
223 |
"text": "D\u00e9claration conjointe sign\u00e9e des parents", |
|
224 |
"label": "D\u00e9claration conjointe sign\u00e9e des parents" |
|
225 |
}, |
|
226 |
{ |
|
227 |
"id": "63", |
|
228 |
"code": "63", |
|
229 |
"rang": "FAMILY", |
|
230 |
"text": "Document donn\u00e9es allocataire", |
|
231 |
"label": "Document donn\u00e9es allocataire" |
|
232 |
}, |
|
233 |
{ |
|
234 |
"id": "72", |
|
235 |
"code": "72", |
|
236 |
"rang": "FAMILY", |
|
237 |
"text": "Extrait d'acte de mariage", |
|
238 |
"label": "Extrait d'acte de mariage" |
|
239 |
}, |
|
240 |
{ |
|
241 |
"id": "76", |
|
242 |
"code": "76", |
|
243 |
"rang": "PERSON", |
|
244 |
"text": "Extrait de naissance", |
|
245 |
"label": "Extrait de naissance" |
|
246 |
}, |
|
247 |
{ |
|
248 |
"id": "77", |
|
249 |
"code": "77", |
|
250 |
"rang": "PERSON", |
|
251 |
"text": "Fiche individuelle enfant version papier num\u00e9ris\u00e9", |
|
252 |
"label": "Fiche individuelle enfant version papier num\u00e9ris\u00e9" |
|
253 |
}, |
|
254 |
{ |
|
255 |
"id": "78", |
|
256 |
"code": "78", |
|
257 |
"rang": "PERSON", |
|
258 |
"text": "Formulaire DUI version papier num\u00e9ris\u00e9", |
|
259 |
"label": "Formulaire DUI version papier num\u00e9ris\u00e9" |
|
260 |
}, |
|
261 |
{ |
|
262 |
"id": "64", |
|
263 |
"code": "64", |
|
264 |
"rang": "FAMILY", |
|
265 |
"text": "Jugement des affaires familiales", |
|
266 |
"label": "Jugement des affaires familiales" |
|
267 |
}, |
|
268 |
{ |
|
269 |
"id": "65", |
|
270 |
"code": "65", |
|
271 |
"rang": "FAMILY", |
|
272 |
"text": "Jugement mise sous tutelle", |
|
273 |
"label": "Jugement mise sous tutelle" |
|
274 |
}, |
|
275 |
{ |
|
276 |
"id": "35", |
|
277 |
"code": "35", |
|
278 |
"rang": "FAMILY", |
|
279 |
"text": "Justificatif de domicile", |
|
280 |
"label": "Justificatif de domicile" |
|
281 |
}, |
|
282 |
{ |
|
283 |
"id": "82", |
|
284 |
"code": "82", |
|
285 |
"rang": "PERSON", |
|
286 |
"text": "Justificatif officiel pr\u00e9cisant l'adresse de l'h\u00e9berg\u00e9", |
|
287 |
"label": "Justificatif officiel pr\u00e9cisant l'adresse de l'h\u00e9berg\u00e9" |
|
288 |
}, |
|
289 |
{ |
|
290 |
"id": "41", |
|
291 |
"code": "41", |
|
292 |
"rang": "PERSON", |
|
293 |
"text": "Lettre justificative de la d\u00e9rogation", |
|
294 |
"label": "Lettre justificative de la d\u00e9rogation" |
|
295 |
}, |
|
296 |
{ |
|
297 |
"id": "36", |
|
298 |
"code": "36", |
|
299 |
"rang": "FAMILY", |
|
300 |
"text": "Livret de famille", |
|
301 |
"label": "Livret de famille" |
|
302 |
}, |
|
303 |
{ |
|
304 |
"id": "84", |
|
305 |
"code": "84", |
|
306 |
"rang": "PERSON", |
|
307 |
"text": "Notification MDPH", |
|
308 |
"label": "Notification MDPH" |
|
309 |
}, |
|
310 |
{ |
|
311 |
"id": "66", |
|
312 |
"code": "66", |
|
313 |
"rang": "PERSON", |
|
314 |
"text": "Ordonnance", |
|
315 |
"label": "Ordonnance" |
|
316 |
}, |
|
317 |
{ |
|
318 |
"id": "86", |
|
319 |
"code": "86", |
|
320 |
"rang": "PERSON", |
|
321 |
"text": "PAI", |
|
322 |
"label": "PAI" |
|
323 |
}, |
|
324 |
{ |
|
325 |
"id": "40", |
|
326 |
"code": "40", |
|
327 |
"rang": "PERSON", |
|
328 |
"text": "PERI - Carte nationale d'identit\u00e9", |
|
329 |
"label": "PERI - Carte nationale d'identit\u00e9" |
|
330 |
}, |
|
331 |
{ |
|
332 |
"id": "67", |
|
333 |
"code": "67", |
|
334 |
"rang": "PERSON", |
|
335 |
"text": "Photocopie attestation CPAM / CMU", |
|
336 |
"label": "Photocopie attestation CPAM / CMU" |
|
337 |
}, |
|
338 |
{ |
|
339 |
"id": "85", |
|
340 |
"code": "85", |
|
341 |
"rang": "PERSON", |
|
342 |
"text": "Preuve carte s\u00e9nior", |
|
343 |
"label": "Preuve carte s\u00e9nior" |
|
344 |
}, |
|
345 |
{ |
|
346 |
"id": "80", |
|
347 |
"code": "80", |
|
348 |
"rang": "PERSON", |
|
349 |
"text": "R\u00e9capitulatif donn\u00e9es sant\u00e9 autorisations enfant", |
|
350 |
"label": "R\u00e9capitulatif donn\u00e9es sant\u00e9 autorisations enfant" |
|
351 |
}, |
|
352 |
{ |
|
353 |
"id": "79", |
|
354 |
"code": "79", |
|
355 |
"rang": "PERSON", |
|
356 |
"text": "R\u00e9capitulatif toutes d\u00e9marches li\u00e9e au DUI", |
|
357 |
"label": "R\u00e9capitulatif toutes d\u00e9marches li\u00e9e au DUI" |
|
358 |
} |
|
359 |
] |
functests/toulouse_maelis/test_data.py | ||
---|---|---|
8 | 8 |
"ref", |
9 | 9 |
[ |
10 | 10 |
'category', |
11 | 11 |
'child-indicator', |
12 | 12 |
'civility', |
13 | 13 |
'country', |
14 | 14 |
'csp', |
15 | 15 |
'dietcode', |
16 |
'document', |
|
16 | 17 |
'organ', |
17 | 18 |
'pai', |
18 | 19 |
'quality', |
19 | 20 |
'quotient', |
20 | 21 |
'rl-indicator', |
21 | 22 |
'situation', |
22 | 23 |
'street', |
23 | 24 |
'vaccin', |
passerelle/contrib/toulouse_maelis/models.py | ||
---|---|---|
98 | 98 |
response = self.call('Family', 'read' + referential_name + 'List') |
99 | 99 |
response = serialize_object(response) |
100 | 100 |
except Exception as e: |
101 | 101 |
raise UpdateError('Service indisponible : %s' % str(e)) |
102 | 102 |
if referential_name == 'Organ': |
103 | 103 |
id_key, text_key = 'id', 'code' |
104 | 104 |
elif referential_name == 'Street': |
105 | 105 |
id_key, text_key = 'idStreet', 'libelleStreet' |
106 |
elif 'Indicator' in referential_name:
|
|
106 |
elif referential_name in ('RLIndicator', 'ChildIndicator', 'Document'):
|
|
107 | 107 |
id_key, text_key = 'code', 'label' |
108 | 108 |
else: |
109 | 109 |
id_key, text_key = 'code', 'libelle' |
110 | 110 | |
111 | 111 |
last_update = now() |
112 | 112 |
for item in response: |
113 | 113 |
text = item[text_key].strip() |
114 | 114 |
self.referential.update_or_create( |
... | ... | |
128 | 128 |
for name in ( |
129 | 129 |
'Category', |
130 | 130 |
'ChildIndicator', |
131 | 131 |
'Civility', |
132 | 132 |
'Complement', |
133 | 133 |
'Country', |
134 | 134 |
'CSP', |
135 | 135 |
'DietCode', |
136 |
'Document', |
|
136 | 137 |
'Organ', |
137 | 138 |
'PAI', |
138 | 139 |
'Quality', |
139 | 140 |
'Quotient', |
140 | 141 |
'RLIndicator', |
141 | 142 |
'Sex', |
142 | 143 |
'Situation', |
143 | 144 |
'Street', |
... | ... | |
576 | 577 |
'q': {'description': 'Recherche en texte intégral'}, |
577 | 578 |
'limit': {'description': 'Nombre maximal de résultats; doit être inférieur à 20.'}, |
578 | 579 |
'distinct': {'description': 'Supression des doublons'}, |
579 | 580 |
}, |
580 | 581 |
) |
581 | 582 |
def read_dietcode_list(self, request, id=None, q=None, limit=None, distinct=True): |
582 | 583 |
return {'data': self.get_referential('DietCode', id, q, limit, distinct)} |
583 | 584 | |
585 |
@endpoint( |
|
586 |
display_category='Famille', |
|
587 |
description='Liste des pièces jointes', |
|
588 |
name='read-document-list', |
|
589 |
perm='can_access', |
|
590 |
parameters={ |
|
591 |
'id': {'description': 'Identifiant de l’enregistrement'}, |
|
592 |
'q': {'description': 'Recherche en texte intégral'}, |
|
593 |
'limit': {'description': 'Nombre maximal de résultats; doit être inférieur à 20.'}, |
|
594 |
'distinct': {'description': 'Supression des doublons'}, |
|
595 |
}, |
|
596 |
) |
|
597 |
def read_document_list(self, request, id=None, q=None, limit=None, distinct=True): |
|
598 |
return {'data': self.get_referential('Document', id, q, limit, distinct)} |
|
599 | ||
584 | 600 |
@endpoint( |
585 | 601 |
display_category='Famille', |
586 | 602 |
description='Liste des organismes (CAF)', |
587 | 603 |
name='read-organ-list', |
588 | 604 |
perm='can_access', |
589 | 605 |
parameters={ |
590 | 606 |
'id': {'description': 'Identifiant de l’enregistrement'}, |
591 | 607 |
'q': {'description': 'Recherche en texte intégral'}, |
tests/data/toulouse_maelis/R_read_document_list.xml | ||
---|---|---|
1 |
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> |
|
2 |
<soap:Body> |
|
3 |
<ns2:readDocumentListResponse xmlns:ns2="family.ws.maelis.sigec.com"> |
|
4 |
<documentList> |
|
5 |
<code>69</code> |
|
6 |
<label>Autorisation de sortie du territoire</label> |
|
7 |
<rang>PERSON</rang> |
|
8 |
</documentList> |
|
9 |
<documentList> |
|
10 |
<code>42</code> |
|
11 |
<label>Autre document utile à la dérogation</label> |
|
12 |
<rang>PERSON</rang> |
|
13 |
</documentList> |
|
14 |
<documentList> |
|
15 |
<code>38</code> |
|
16 |
<label>Copie pages de vaccination</label> |
|
17 |
<rang>PERSON</rang> |
|
18 |
</documentList> |
|
19 |
<documentList> |
|
20 |
<code>41</code> |
|
21 |
<label>Lettre justificative de la dérogation</label> |
|
22 |
<rang>PERSON</rang> |
|
23 |
</documentList> |
|
24 |
<documentList> |
|
25 |
<code>40</code> |
|
26 |
<label>PERI - Carte nationale d'identité</label> |
|
27 |
<rang>PERSON</rang> |
|
28 |
</documentList> |
|
29 |
<documentList> |
|
30 |
<code>43</code> |
|
31 |
<label>Acte notarié de divorce</label> |
|
32 |
<rang>FAMILY</rang> |
|
33 |
</documentList> |
|
34 |
<documentList> |
|
35 |
<code>45</code> |
|
36 |
<label>Attestation CAF</label> |
|
37 |
<rang>FAMILY</rang> |
|
38 |
</documentList> |
|
39 |
<documentList> |
|
40 |
<code>46</code> |
|
41 |
<label>Attestation CD31</label> |
|
42 |
<rang>FAMILY</rang> |
|
43 |
</documentList> |
|
44 |
<documentList> |
|
45 |
<code>47</code> |
|
46 |
<label>Attestation d'attribution ou non de bourse</label> |
|
47 |
<rang>FAMILY</rang> |
|
48 |
</documentList> |
|
49 |
<documentList> |
|
50 |
<code>49</code> |
|
51 |
<label>Attestation de paiement Office français de l'immigration et intégration</label> |
|
52 |
<rang>FAMILY</rang> |
|
53 |
</documentList> |
|
54 |
<documentList> |
|
55 |
<code>50</code> |
|
56 |
<label>Attestation de paiement Pôle emploi</label> |
|
57 |
<rang>FAMILY</rang> |
|
58 |
</documentList> |
|
59 |
<documentList> |
|
60 |
<code>55</code> |
|
61 |
<label>Attestation d'inscription au registre du Commerce et des Métiers - Kbis</label> |
|
62 |
<rang>FAMILY</rang> |
|
63 |
</documentList> |
|
64 |
<documentList> |
|
65 |
<code>52</code> |
|
66 |
<label>Attestation hébergement organismes tiers</label> |
|
67 |
<rang>FAMILY</rang> |
|
68 |
</documentList> |
|
69 |
<documentList> |
|
70 |
<code>53</code> |
|
71 |
<label>Attestation indemn. arrêt maladie CPAM</label> |
|
72 |
<rang>FAMILY</rang> |
|
73 |
</documentList> |
|
74 |
<documentList> |
|
75 |
<code>54</code> |
|
76 |
<label>Attestation indemn. Pôle emploi</label> |
|
77 |
<rang>FAMILY</rang> |
|
78 |
</documentList> |
|
79 |
<documentList> |
|
80 |
<code>56</code> |
|
81 |
<label>Attestation organismes associatifs</label> |
|
82 |
<rang>FAMILY</rang> |
|
83 |
</documentList> |
|
84 |
<documentList> |
|
85 |
<code>48</code> |
|
86 |
<label>Attestation paiement CPAM</label> |
|
87 |
<rang>FAMILY</rang> |
|
88 |
</documentList> |
|
89 |
<documentList> |
|
90 |
<code>51</code> |
|
91 |
<label>Attestation prise en charge Maison d'enfants</label> |
|
92 |
<rang>FAMILY</rang> |
|
93 |
</documentList> |
|
94 |
<documentList> |
|
95 |
<code>57</code> |
|
96 |
<label>Attestation travailleur social</label> |
|
97 |
<rang>FAMILY</rang> |
|
98 |
</documentList> |
|
99 |
<documentList> |
|
100 |
<code>58</code> |
|
101 |
<label>Avis d'imposition / non imposition</label> |
|
102 |
<rang>FAMILY</rang> |
|
103 |
</documentList> |
|
104 |
<documentList> |
|
105 |
<code>59</code> |
|
106 |
<label>Bilan comptable</label> |
|
107 |
<rang>FAMILY</rang> |
|
108 |
</documentList> |
|
109 |
<documentList> |
|
110 |
<code>60</code> |
|
111 |
<label>Bulletin de salaire</label> |
|
112 |
<rang>FAMILY</rang> |
|
113 |
</documentList> |
|
114 |
<documentList> |
|
115 |
<code>61</code> |
|
116 |
<label>Carte étudiant</label> |
|
117 |
<rang>FAMILY</rang> |
|
118 |
</documentList> |
|
119 |
<documentList> |
|
120 |
<code>37</code> |
|
121 |
<label>Déclaration conjointe signée des parents</label> |
|
122 |
<rang>FAMILY</rang> |
|
123 |
</documentList> |
|
124 |
<documentList> |
|
125 |
<code>63</code> |
|
126 |
<label>Document données allocataire</label> |
|
127 |
<rang>FAMILY</rang> |
|
128 |
</documentList> |
|
129 |
<documentList> |
|
130 |
<code>64</code> |
|
131 |
<label>Jugement des affaires familiales</label> |
|
132 |
<rang>FAMILY</rang> |
|
133 |
</documentList> |
|
134 |
<documentList> |
|
135 |
<code>65</code> |
|
136 |
<label>Jugement mise sous tutelle</label> |
|
137 |
<rang>FAMILY</rang> |
|
138 |
</documentList> |
|
139 |
<documentList> |
|
140 |
<code>35</code> |
|
141 |
<label>Justificatif de domicile</label> |
|
142 |
<rang>FAMILY</rang> |
|
143 |
</documentList> |
|
144 |
<documentList> |
|
145 |
<code>36</code> |
|
146 |
<label>Livret de famille</label> |
|
147 |
<rang>FAMILY</rang> |
|
148 |
</documentList> |
|
149 |
<documentList> |
|
150 |
<code>44</code> |
|
151 |
<label>Attestation aide médicale de l'état CPAM</label> |
|
152 |
<rang>PERSON</rang> |
|
153 |
</documentList> |
|
154 |
<documentList> |
|
155 |
<code>68</code> |
|
156 |
<label>Carte mutuelle ou CMU</label> |
|
157 |
<rang>PERSON</rang> |
|
158 |
</documentList> |
|
159 |
<documentList> |
|
160 |
<code>62</code> |
|
161 |
<label>Copie passeport</label> |
|
162 |
<rang>PERSON</rang> |
|
163 |
</documentList> |
|
164 |
<documentList> |
|
165 |
<code>66</code> |
|
166 |
<label>Ordonnance</label> |
|
167 |
<rang>PERSON</rang> |
|
168 |
</documentList> |
|
169 |
<documentList> |
|
170 |
<code>67</code> |
|
171 |
<label>Photocopie attestation CPAM / CMU</label> |
|
172 |
<rang>PERSON</rang> |
|
173 |
</documentList> |
|
174 |
<documentList> |
|
175 |
<code>81</code> |
|
176 |
<label>Attestation d'hébergement d'une personne physique</label> |
|
177 |
<rang>FAMILY</rang> |
|
178 |
</documentList> |
|
179 |
<documentList> |
|
180 |
<code>83</code> |
|
181 |
<label>Attestation responsabilité civile</label> |
|
182 |
<rang>PERSON</rang> |
|
183 |
</documentList> |
|
184 |
<documentList> |
|
185 |
<code>70</code> |
|
186 |
<label>Carte nationnale d'identité</label> |
|
187 |
<rang>PERSON</rang> |
|
188 |
</documentList> |
|
189 |
<documentList> |
|
190 |
<code>71</code> |
|
191 |
<label>Certificat de PACS</label> |
|
192 |
<rang>FAMILY</rang> |
|
193 |
</documentList> |
|
194 |
<documentList> |
|
195 |
<code>73</code> |
|
196 |
<label>Certificat de scolarité</label> |
|
197 |
<rang>PERSON</rang> |
|
198 |
</documentList> |
|
199 |
<documentList> |
|
200 |
<code>74</code> |
|
201 |
<label>Copie carte de séjour</label> |
|
202 |
<rang>PERSON</rang> |
|
203 |
</documentList> |
|
204 |
<documentList> |
|
205 |
<code>75</code> |
|
206 |
<label>Courrier ou mail famille reçu</label> |
|
207 |
<rang>PERSON</rang> |
|
208 |
</documentList> |
|
209 |
<documentList> |
|
210 |
<code>72</code> |
|
211 |
<label>Extrait d'acte de mariage</label> |
|
212 |
<rang>FAMILY</rang> |
|
213 |
</documentList> |
|
214 |
<documentList> |
|
215 |
<code>76</code> |
|
216 |
<label>Extrait de naissance</label> |
|
217 |
<rang>PERSON</rang> |
|
218 |
</documentList> |
|
219 |
<documentList> |
|
220 |
<code>77</code> |
|
221 |
<label>Fiche individuelle enfant version papier numérisé</label> |
|
222 |
<rang>PERSON</rang> |
|
223 |
</documentList> |
|
224 |
<documentList> |
|
225 |
<code>78</code> |
|
226 |
<label>Formulaire DUI version papier numérisé</label> |
|
227 |
<rang>PERSON</rang> |
|
228 |
</documentList> |
|
229 |
<documentList> |
|
230 |
<code>82</code> |
|
231 |
<label>Justificatif officiel précisant l'adresse de l'hébergé</label> |
|
232 |
<rang>PERSON</rang> |
|
233 |
</documentList> |
|
234 |
<documentList> |
|
235 |
<code>84</code> |
|
236 |
<label>Notification MDPH</label> |
|
237 |
<rang>PERSON</rang> |
|
238 |
</documentList> |
|
239 |
<documentList> |
|
240 |
<code>86</code> |
|
241 |
<label>PAI</label> |
|
242 |
<rang>PERSON</rang> |
|
243 |
</documentList> |
|
244 |
<documentList> |
|
245 |
<code>85</code> |
|
246 |
<label>Preuve carte sénior</label> |
|
247 |
<rang>PERSON</rang> |
|
248 |
</documentList> |
|
249 |
<documentList> |
|
250 |
<code>80</code> |
|
251 |
<label>Récapitulatif données santé autorisations enfant</label> |
|
252 |
<rang>PERSON</rang> |
|
253 |
</documentList> |
|
254 |
<documentList> |
|
255 |
<code>79</code> |
|
256 |
<label>Récapitulatif toutes démarches liée au DUI</label> |
|
257 |
<rang>PERSON</rang> |
|
258 |
</documentList> |
|
259 |
</ns2:readDocumentListResponse> |
|
260 |
</soap:Body> |
|
261 |
</soap:Envelope> |
tests/test_toulouse_maelis.py | ||
---|---|---|
105 | 105 |
family_service.add_soap_response( |
106 | 106 |
mock, 'readChildIndicatorList', get_xml_file('R_read_child_indicator_list.xml') |
107 | 107 |
) |
108 | 108 |
family_service.add_soap_response( |
109 | 109 |
mock, 'readCivilityList', get_xml_file('R_read_civility_list.xml') |
110 | 110 |
) |
111 | 111 |
family_service.add_soap_response(mock, 'readCountryList', get_xml_file('R_read_country_list.xml')) |
112 | 112 |
family_service.add_soap_response(mock, 'readCSPList', get_xml_file('R_read_csp_list.xml')) |
113 |
family_service.add_soap_response( |
|
114 |
mock, 'readDocumentList', get_xml_file('R_read_document_list.xml') |
|
115 |
) |
|
113 | 116 |
family_service.add_soap_response( |
114 | 117 |
mock, 'readDietCodeList', get_xml_file('R_read_dietcode_list.xml') |
115 | 118 |
) |
116 | 119 |
family_service.add_soap_response(mock, 'readOrganList', get_xml_file('R_read_organ_list.xml')) |
117 | 120 |
family_service.add_soap_response(mock, 'readPAIList', get_xml_file('R_read_pai_list.xml')) |
118 | 121 |
family_service.add_soap_response(mock, 'readQualityList', get_xml_file('R_read_quality_list.xml')) |
119 | 122 |
family_service.add_soap_response( |
120 | 123 |
mock, 'readQuotientList', get_xml_file('R_read_quotient_list.xml') |
... | ... | |
280 | 283 |
assert sorted(list({x.referential_name for x in Referential.objects.all()})) == [ |
281 | 284 |
'CSP', |
282 | 285 |
'Category', |
283 | 286 |
'ChildIndicator', |
284 | 287 |
'Civility', |
285 | 288 |
'Complement', |
286 | 289 |
'Country', |
287 | 290 |
'DietCode', |
291 |
'Document', |
|
288 | 292 |
'Organ', |
289 | 293 |
'PAI', |
290 | 294 |
'Quality', |
291 | 295 |
'Quotient', |
292 | 296 |
'RLIndicator', |
293 | 297 |
'Sex', |
294 | 298 |
'Situation', |
295 | 299 |
'Street', |
296 | 300 |
'Vaccin', |
297 | 301 |
] |
298 |
assert Referential.objects.count() == 230
|
|
302 |
assert Referential.objects.count() == 281
|
|
299 | 303 | |
300 | 304 | |
301 | 305 |
def test_link(family_service, con, app): |
302 | 306 |
def request_check(request): |
303 | 307 |
assert request.dossierNumber == 1312 |
304 | 308 | |
305 | 309 |
family_service.add_soap_response( |
306 | 310 |
'readFamily', get_xml_file('R_read_family.xml'), request_check=request_check |
... | ... | |
485 | 489 |
}, |
486 | 490 |
{'id': 'BB', 'code': 'BB', 'text': 'REPAS BEBE', 'libelle': 'REPAS BEBE'}, |
487 | 491 |
{'id': 'MSP', 'code': 'MSP', 'text': 'REPAS MOYEN SANS PORC', 'libelle': 'REPAS MOYEN SANS PORC'}, |
488 | 492 |
{'id': 'MSV', 'code': 'MSV', 'text': 'REPAS MOYEN SANS VIANDE', 'libelle': 'REPAS MOYEN SANS VIANDE'}, |
489 | 493 |
{'id': 'MST', 'code': 'MST', 'text': 'REPAS MOYEN STANDARD', 'libelle': 'REPAS MOYEN STANDARD'}, |
490 | 494 |
] |
491 | 495 | |
492 | 496 | |
497 |
def test_read_document_list(con, app): |
|
498 |
url = get_endpoint('read-document-list') |
|
499 |
resp = app.get(url) |
|
500 |
assert resp.json['err'] == 0 |
|
501 |
assert resp.json['data'][:5] == [ |
|
502 |
{ |
|
503 |
'id': '43', |
|
504 |
'code': '43', |
|
505 |
'rang': 'FAMILY', |
|
506 |
'text': 'Acte notarié de divorce', |
|
507 |
'label': 'Acte notarié de divorce', |
|
508 |
}, |
|
509 |
{ |
|
510 |
'id': '44', |
|
511 |
'code': '44', |
|
512 |
'rang': 'PERSON', |
|
513 |
'text': "Attestation aide médicale de l'état CPAM", |
|
514 |
'label': "Attestation aide médicale de l'état CPAM", |
|
515 |
}, |
|
516 |
{'id': '45', 'code': '45', 'rang': 'FAMILY', 'text': 'Attestation CAF', 'label': 'Attestation CAF'}, |
|
517 |
{'id': '46', 'code': '46', 'rang': 'FAMILY', 'text': 'Attestation CD31', 'label': 'Attestation CD31'}, |
|
518 |
{ |
|
519 |
'id': '47', |
|
520 |
'code': '47', |
|
521 |
'rang': 'FAMILY', |
|
522 |
'text': "Attestation d'attribution ou non de bourse", |
|
523 |
'label': "Attestation d'attribution ou non de bourse", |
|
524 |
}, |
|
525 |
] |
|
526 | ||
527 | ||
493 | 528 |
def test_read_organ_list(con, app): |
494 | 529 |
url = get_endpoint('read-organ-list') |
495 | 530 |
resp = app.get(url) |
496 | 531 |
assert resp.json['err'] == 0 |
497 | 532 |
assert len(resp.json['data']) == 92 |
498 | 533 |
assert resp.json['data'][:5] == [ |
499 | 534 |
{'id': 'A10000979374', 'code': 'ALC L OLIVIER', 'text': 'ALC L OLIVIER', 'libelle': None}, |
500 | 535 |
{'id': 'A10000979372', 'code': 'ALVA 06', 'text': 'ALVA 06', 'libelle': None}, |
501 |
- |