Update tests to reflect unencoded commas in URLs

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.
This commit is contained in:
Chris Hill-Scott
2022-05-27 15:42:53 +01:00
parent 2a62586799
commit fc833c802e

View File

@@ -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(