|
| 1 | +import html |
1 | 2 | import json
|
2 | 3 | from unittest import mock
|
3 | 4 |
|
@@ -280,39 +281,39 @@ def test_import_flow_reports_errors(self) -> None:
|
280 | 281 |
|
281 | 282 | response = form.submit().follow()
|
282 | 283 |
|
283 |
| - messages = [str(msg) for msg in response.context["messages"]] |
| 284 | + messages = [html.unescape(str(msg)) for msg in response.context["messages"]] |
284 | 285 | self.assertEqual(len(messages), 2)
|
285 | 286 | self.assertEqual(
|
286 | 287 | _("6 item(s) processed in total, with 6 failing row(s)."),
|
287 | 288 | messages[0],
|
288 | 289 | )
|
289 | 290 | self.assertIn(
|
290 |
| - "ZaakTypeConfig not found in target environment: Identificatie = ztc-id-a-0, " |
291 |
| - "Catalogus domein = DM-0, Catalogus rsin = 123456789", |
| 291 | + "ZaakTypeConfig not found in target environment: Identificatie = 'ztc-id-a-0', " |
| 292 | + "Catalogus domein = 'DM-0', Catalogus rsin = '123456789'", |
292 | 293 | messages[1],
|
293 | 294 | )
|
294 | 295 | self.assertIn(
|
295 |
| - "ZaakTypeStatusTypeConfig not found in target environment: omschrijving = status omschrijving, " |
296 |
| - "ZaakTypeConfig identificatie = ztc-id-a-0, Catalogus domein = DM-0, Catalogus rsin = 123456789", |
| 296 | + "ZaakTypeStatusTypeConfig not found in target environment: omschrijving = 'status omschrijving', " |
| 297 | + "ZaakTypeConfig identificatie = 'ztc-id-a-0', Catalogus domein = 'DM-0', Catalogus rsin = '123456789'", |
297 | 298 | messages[1],
|
298 | 299 | )
|
299 | 300 | self.assertIn(
|
300 |
| - "ZaakTypeStatusTypeConfig not found in target environment: omschrijving = bogus, ZaakTypeConfig " |
301 |
| - "identificatie = ztc-id-a-0, Catalogus domein = DM-0, Catalogus rsin = 123456789", |
| 301 | + "ZaakTypeStatusTypeConfig not found in target environment: omschrijving = 'bogus', ZaakTypeConfig " |
| 302 | + "identificatie = 'ztc-id-a-0', Catalogus domein = 'DM-0', Catalogus rsin = '123456789'", |
302 | 303 | messages[1],
|
303 | 304 | )
|
304 | 305 | self.assertIn(
|
305 |
| - "ZaakTypeInformatieObjectTypeConfig not found in target environment: omschrijving = informatieobject, " |
306 |
| - "ZaakTypeConfig identificatie = ztc-id-a-0, Catalogus domein = DM-0, Catalogus rsin = 123456789", |
| 306 | + "ZaakTypeInformatieObjectTypeConfig not found in target environment: omschrijving = 'informatieobject', " |
| 307 | + "ZaakTypeConfig identificatie = 'ztc-id-a-0', Catalogus domein = 'DM-0', Catalogus rsin = '123456789'", |
307 | 308 | messages[1],
|
308 | 309 | )
|
309 | 310 | self.assertIn(
|
310 |
| - "CatalogusConfig not found in target environment: Domein = DM-0, Rsin = 123456789", |
| 311 | + "CatalogusConfig not found in target environment: Domein = 'DM-0', Rsin = '123456789'", |
311 | 312 | messages[1],
|
312 | 313 | )
|
313 | 314 | self.assertIn(
|
314 |
| - "ZaakTypeResultaatTypeConfig not found in target environment: omschrijving = resultaat, " |
315 |
| - "ZaakTypeConfig identificatie = ztc-id-a-0, Catalogus domein = DM-0, Catalogus rsin = 123456789", |
| 315 | + "ZaakTypeResultaatTypeConfig not found in target environment: omschrijving = 'resultaat', " |
| 316 | + "ZaakTypeConfig identificatie = 'ztc-id-a-0', Catalogus domein = 'DM-0', Catalogus rsin = '123456789'", |
316 | 317 | messages[1],
|
317 | 318 | )
|
318 | 319 |
|
@@ -341,13 +342,13 @@ def test_import_flow_reports_partial_errors(self) -> None:
|
341 | 342 |
|
342 | 343 | response = form.submit().follow()
|
343 | 344 |
|
344 |
| - messages = [str(msg) for msg in response.context["messages"]] |
| 345 | + messages = [html.unescape(str(msg)) for msg in response.context["messages"]] |
345 | 346 | self.assertEqual(len(messages), 2)
|
346 | 347 | self.assertEqual(
|
347 | 348 | _("2 item(s) processed in total, with 1 failing row(s)."),
|
348 | 349 | messages[0],
|
349 | 350 | )
|
350 | 351 | self.assertEqual(
|
351 |
| - "It was not possible to import the following items:<ol> <li>ZaakTypeConfig not found in target environment: Identificatie = ztc-id-a-0, Catalogus domein = DM-0, Catalogus rsin = 123456789</li> </ol>", |
| 352 | + "It was not possible to import the following items:<div><p> - ZaakTypeConfig not found in target environment: Identificatie = 'ztc-id-a-0', Catalogus domein = 'DM-0', Catalogus rsin = '123456789'</p></div>", |
352 | 353 | messages[1],
|
353 | 354 | )
|
0 commit comments