tests/test_cross_links.py (636 bytes)
1 """The pages link the other sites and apps of the author, but not SubRead 2 itself.""" 3 4 from __future__ import annotations 5 6 import pytest 7 8 OTHERS = ( 9 'href="https://booksimulator.com/"', 10 'href="https://sbmsync.com/"', 11 'href="https://github.com/equwal/subread-overlay/releases/latest"', 12 'href="https://recentlywritten.com/projects.html"', 13 ) 14 15 16 @pytest.mark.parametrize("path", ["/", "/subrep.html"]) 17 def test_the_page_links_the_other_sites_and_apps(client, path): 18 page = client.get(path).text 19 for link in OTHERS: 20 assert link in page, (path, link) 21 assert 'href="https://subread.space/"' not in page, path