make the feed ID be a valid URL for compliance

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
This commit is contained in:
Brian S. Stephan 2023-12-30 15:19:00 -06:00
parent 6dc443e59f
commit b26975421c
Signed by: bss
GPG Key ID: 3DE06D3180895FCB
2 changed files with 3 additions and 2 deletions

View File

@ -32,7 +32,7 @@ def serve_feed(feed_type):
abort(404)
fg = FeedGenerator()
fg.id(f'{app.config["DOMAIN_NAME"]}')
fg.id(f'https://{app.config["DOMAIN_NAME"]}/')
fg.title(f'{app.config["TITLE_SUFFIX"]}')
fg.link(href=f'https://{app.config["DOMAIN_NAME"]}/feed/{feed_type}', rel='self')
fg.link(href=f'https://{app.config["DOMAIN_NAME"]}', rel='alternate')

View File

@ -29,4 +29,5 @@ def test_rss_type_is_200(client):
def test_feed_generator(app):
"""Test the root feed generator."""
with app.test_request_context():
serve_feed('atom')
content = serve_feed('atom')
assert b'<id>https://example.com/</id>' in content