From 013248d96e2aa0a59d630ec395a18d145eeb1810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laur=C3=A9line=20Gu=C3=A9rin?= Date: Thu, 30 Sep 2021 17:10:15 +0200 Subject: [PATCH] lingo: callback_url is not displayed as a link (#56646) --- .../lingo/templates/lingo/paymentbackend_form.html | 2 +- combo/apps/lingo/templates/lingo/regie_form.html | 2 +- tests/test_lingo_manager.py | 14 ++++++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/combo/apps/lingo/templates/lingo/paymentbackend_form.html b/combo/apps/lingo/templates/lingo/paymentbackend_form.html index e4491d5e..85476133 100644 --- a/combo/apps/lingo/templates/lingo/paymentbackend_form.html +++ b/combo/apps/lingo/templates/lingo/paymentbackend_form.html @@ -12,7 +12,7 @@ {% block content %}
{% if object.id and callback_url %} -

{{ callback_url }}

+

{{ callback_url }}

{% endif %} {% csrf_token %} {{ form.as_p }} diff --git a/combo/apps/lingo/templates/lingo/regie_form.html b/combo/apps/lingo/templates/lingo/regie_form.html index 0555656d..892d287d 100644 --- a/combo/apps/lingo/templates/lingo/regie_form.html +++ b/combo/apps/lingo/templates/lingo/regie_form.html @@ -12,7 +12,7 @@ {% block content %} {% if object.id and callback_url %} -

{{ callback_url }}

+

{{ callback_url }}

{% endif %} {% csrf_token %} {{ form.as_p }} diff --git a/tests/test_lingo_manager.py b/tests/test_lingo_manager.py index 0a893f01..be2f5b54 100644 --- a/tests/test_lingo_manager.py +++ b/tests/test_lingo_manager.py @@ -69,8 +69,11 @@ def test_edit_regie(app, admin_user, payment_backend): assert '/manage/lingo/regies/' in resp.text # callback URL is shown - assert 'Callback URL' in resp - assert 'http://testserver/lingo/callback-payment-backend/%s/' % payment_backend.slug in resp + assert ( + '

http://testserver/lingo/callback-payment-backend/%s/

' + % payment_backend.slug + in resp + ) resp.forms[0]['description'] = 'other description' resp = resp.forms[0].submit() @@ -636,8 +639,11 @@ def test_edit_payment_backend(app, admin_user): assert '/manage/lingo/paymentbackends/' in resp.text # callback URL is shown - assert 'Callback URL' in resp - assert 'http://testserver/lingo/callback-payment-backend/%s' % payment_backend.slug in resp + assert ( + '

http://testserver/lingo/callback-payment-backend/%s/

' + % payment_backend.slug + in resp + ) # service cannot be changed assert 'disabled' in resp.form['service'].attrs