From fc833c802e423cffe1897f27465d9939df452f20 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Fri, 27 May 2022 15:42:53 +0100 Subject: [PATCH] Update tests to reflect unencoded commas in URLs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I can’t find the changelog for this but it looks like somewhere someone has decided that commas don’t need to be URL-encoded. This is true for use in `href` attributes because it’s unambiguous that the comma is part of the URL (unlike a closing quote for example, which could be misinterpreted as HTML syntax). This commit jut changes the test to reflect that the URLs generated by Flask now have raw commas in them. --- tests/app/main/views/test_activity.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/app/main/views/test_activity.py b/tests/app/main/views/test_activity.py index 1431e9183..21e85e561 100644 --- a/tests/app/main/views/test_activity.py +++ b/tests/app/main/views/test_activity.py @@ -1,7 +1,7 @@ import json import uuid from functools import partial -from urllib.parse import parse_qs, quote, urlparse +from urllib.parse import parse_qs, urlparse import pytest from flask import url_for @@ -600,7 +600,7 @@ def test_get_status_filters_constructs_links(client_request): ret = get_status_filters(Service({'id': 'foo'}), 'sms', STATISTICS) link = ret[0][2] - assert link == '/services/foo/notifications/sms?status={}'.format(quote('sending,delivered,failed')) + assert link == '/services/foo/notifications/sms?status={}'.format('sending,delivered,failed') def test_html_contains_notification_id(