Rename the endpoints.

Increase test coverage to include the encrypted message sent to the task.
This commit is contained in:
Rebecca Law
2016-10-13 11:59:47 +01:00
parent b37eef974c
commit 9ffdf66c49
3 changed files with 33 additions and 19 deletions

View File

@@ -11,3 +11,10 @@ def pagination_links(pagination, endpoint, **kwargs):
links['next'] = url_for(endpoint, page=pagination.next_num, **kwargs)
links['last'] = url_for(endpoint, page=pagination.pages, **kwargs)
return links
def url_with_token(data, url, config):
from notifications_utils.url_safe_token import generate_token
token = generate_token(data, config['SECRET_KEY'], config['DANGEROUS_SALT'])
base_url = config['ADMIN_BASE_URL'] + url
return base_url + token