chore: tests, changelog, project docs (Phase G)
- Rename test_market_score.py → test_padelnomics_score.py - Test 301 redirects from old /market-score URL - Update i18n parity allowlist (remove mscore_*, add pnscore brand terms) - Update CHANGELOG.md with single-score simplification - Update PROJECT.md: mark single-score done, fix location_profiles refs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
64
web/tests/test_padelnomics_score.py
Normal file
64
web/tests/test_padelnomics_score.py
Normal file
@@ -0,0 +1,64 @@
|
||||
"""Tests for the Padelnomics Score methodology page."""
|
||||
|
||||
|
||||
async def test_en_returns_200(client):
|
||||
resp = await client.get("/en/padelnomics-score")
|
||||
assert resp.status_code == 200
|
||||
text = await resp.get_data(as_text=True)
|
||||
assert "Padelnomics Score" in text
|
||||
assert "padelnomics" in text
|
||||
|
||||
|
||||
async def test_de_returns_200(client):
|
||||
resp = await client.get("/de/padelnomics-score")
|
||||
assert resp.status_code == 200
|
||||
text = await resp.get_data(as_text=True)
|
||||
assert "Padelnomics Score" in text
|
||||
assert "padelnomics" in text
|
||||
|
||||
|
||||
async def test_old_market_score_redirects(client):
|
||||
resp = await client.get("/en/market-score")
|
||||
assert resp.status_code == 301
|
||||
assert "/padelnomics-score" in resp.headers["Location"]
|
||||
|
||||
|
||||
async def test_de_old_market_score_redirects(client):
|
||||
resp = await client.get("/de/market-score")
|
||||
assert resp.status_code == 301
|
||||
assert "/padelnomics-score" in resp.headers["Location"]
|
||||
|
||||
|
||||
async def test_contains_jsonld(client):
|
||||
resp = await client.get("/en/padelnomics-score")
|
||||
text = await resp.get_data(as_text=True)
|
||||
assert '"@type": "WebPage"' in text
|
||||
assert '"@type": "FAQPage"' in text
|
||||
assert '"@type": "BreadcrumbList"' in text
|
||||
|
||||
|
||||
async def test_contains_faq_section(client):
|
||||
resp = await client.get("/en/padelnomics-score")
|
||||
text = await resp.get_data(as_text=True)
|
||||
assert "Frequently Asked Questions" in text
|
||||
assert "<details" in text
|
||||
|
||||
|
||||
async def test_de_contains_faq_section(client):
|
||||
resp = await client.get("/de/padelnomics-score")
|
||||
text = await resp.get_data(as_text=True)
|
||||
assert "Häufige Fragen" in text
|
||||
|
||||
|
||||
async def test_contains_og_tags(client):
|
||||
resp = await client.get("/en/padelnomics-score")
|
||||
text = await resp.get_data(as_text=True)
|
||||
assert 'og:title' in text
|
||||
assert 'og:description' in text
|
||||
|
||||
|
||||
async def test_footer_has_padelnomics_score_link(client):
|
||||
resp = await client.get("/en/padelnomics-score")
|
||||
text = await resp.get_data(as_text=True)
|
||||
assert "/padelnomics-score" in text
|
||||
assert "Padelnomics Score" in text
|
||||
Reference in New Issue
Block a user