cartads_cs: add status for zip sent but not accepted (#36187)
This commit is contained in:
parent
a39595b400
commit
038677a67d
|
@ -912,6 +912,9 @@ class AbstractCartaDSCS(BaseResource):
|
|||
elif dossier.zip_sent:
|
||||
status_id = 'zip-sent'
|
||||
status_label = _('File sent')
|
||||
if dossier.zip_ack_response == 'False':
|
||||
status_id = 'zip-not-considered'
|
||||
status_label = _('File not considered')
|
||||
elif dossier.zip_ready:
|
||||
status_id = 'zip-ready'
|
||||
status_label = _('File ready to be sent')
|
||||
|
|
|
@ -395,6 +395,17 @@ def test_status_error(connector, app, cached_data):
|
|||
assert resp.json['status_label'] == u"File refused (Le modèle sélectionné ne correspond à aucun Cerfa géré par l'application.)"
|
||||
|
||||
|
||||
def test_status_zip_not_considered_error(connector, app, cached_data):
|
||||
CartaDSDossier.objects.all().delete()
|
||||
test_send_notification_error(connector, app, cached_data)
|
||||
dossier = CartaDSDossier.objects.all()[0]
|
||||
dossier.notification_message = None
|
||||
dossier.zip_ack_response = 'False'
|
||||
dossier.save()
|
||||
resp = app.get('/cartads-cs/test/status?dossier_id=%s' % dossier.id)
|
||||
assert resp.json['status_label'] == u"File not considered"
|
||||
|
||||
|
||||
def test_additional_pieces_management(connector, app, cached_data):
|
||||
CartaDSDossier.objects.all().delete()
|
||||
test_send(connector, app, cached_data)
|
||||
|
|
Loading…
Reference in New Issue