From 5001862d67556f5c19fdefa7a0ca375b601afef6 Mon Sep 17 00:00:00 2001 From: Kiran Jonnalagadda Date: Tue, 29 Oct 2024 15:30:10 +0530 Subject: [PATCH] Update SMS template test; stringify furl before returning JSON (#2132) --- funnel/views/api/shortlink.py | 2 +- tests/unit/transports/sms_template_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/funnel/views/api/shortlink.py b/funnel/views/api/shortlink.py index cfda213d1..42997fb47 100644 --- a/funnel/views/api/shortlink.py +++ b/funnel/views/api/shortlink.py @@ -55,5 +55,5 @@ def create_shortlink( return { 'status': 'ok', 'shortlink': app_url_for(shortlinkapp, 'link', name=sl.name, _external=True), - 'url': url, + 'url': str(url), }, status_code diff --git a/tests/unit/transports/sms_template_test.py b/tests/unit/transports/sms_template_test.py index 7dbd90e8a..a3013b508 100644 --- a/tests/unit/transports/sms_template_test.py +++ b/tests/unit/transports/sms_template_test.py @@ -237,5 +237,5 @@ def test_web_otp_template() -> None: t = sms.WebOtpTemplate(otp='1234') assert str(t) == ( 'OTP is 1234 for Hasgeek. If you did not request this, report misuse at ' - 'https://has.gy/not-my-otp\n\n@hasgeek.com #1234' + 'https://hasgeek.com/account/not-my-otp\n\n@hasgeek.com #1234' )