def test_json_link(factories, pyramid_config, pyramid_request): annotation = factories.Annotation(id='e22AJlHYQNCG70bXL7gr1w') pyramid_config.add_route('api.annotation', '/annos/{id}') link = links.json_link(pyramid_request, annotation) assert link == 'http://example.com/annos/e22AJlHYQNCG70bXL7gr1w'
def test_json_link(factories, pyramid_config, pyramid_request): annotation = factories.Annotation(id="e22AJlHYQNCG70bXL7gr1w") pyramid_config.add_route("api.annotation", "/annos/{id}") link = links.json_link(pyramid_request, annotation) assert link == "http://example.com/annos/e22AJlHYQNCG70bXL7gr1w"