Stop url_for double-encoding .'s in password test

One of the changes this pulls in is encoding of
periods in the token used for new password
requests.

In real-life the resulting URL is build by
concatenating the base url with the token so it
isn't processed further.

The test for new password requests builds the URL
with url_for. This encodes the result returned so
the periods are encoded twice.
This commit is contained in:
Tom Byers
2018-10-18 14:34:07 +01:00
parent f5014e8352
commit 29c46a27f8
4 changed files with 31 additions and 13 deletions

View File

@@ -3227,3 +3227,8 @@ def mock_create_event(mocker):
return
return mocker.patch('app.events_api_client.create_event', side_effect=_add_event)
def url_for_endpoint_with_token(endpoint, token):
token = token.replace('%2E', '.')
return url_for(endpoint, token=token)