Refactor URL handling to use BASE_URL across the application and add base_url context processor
All checks were successful
Deploy to Server / deploy (push) Successful in 22s
All checks were successful
Deploy to Server / deploy (push) Successful in 22s
This commit is contained in:
parent
999ab368e2
commit
d4fd35769d
11 changed files with 250 additions and 167 deletions
|
|
@ -52,10 +52,10 @@ def test_meta_tags_use_request_absolute_url_for_og_url_and_canonical() -> None:
|
|||
_extract_meta_content(content, "og:url")
|
||||
== "https://ttvdrops.lovinator.space/drops/"
|
||||
)
|
||||
assert (
|
||||
'<link rel="canonical" href="https://ttvdrops.lovinator.space/drops/" />'
|
||||
in content
|
||||
canonical_pattern: re.Pattern[str] = re.compile(
|
||||
r'<link\s+rel="canonical"\s+href="https://ttvdrops\.lovinator\.space/drops/"\s*/?>',
|
||||
)
|
||||
assert canonical_pattern.search(content) is not None
|
||||
|
||||
|
||||
def test_meta_tags_use_explicit_page_url_for_og_url_and_canonical() -> None:
|
||||
|
|
@ -71,10 +71,10 @@ def test_meta_tags_use_explicit_page_url_for_og_url_and_canonical() -> None:
|
|||
_extract_meta_content(content, "og:url")
|
||||
== "https://ttvdrops.lovinator.space/custom-page/"
|
||||
)
|
||||
assert (
|
||||
'<link rel="canonical" href="https://ttvdrops.lovinator.space/custom-page/" />'
|
||||
in content
|
||||
canonical_pattern: re.Pattern[str] = re.compile(
|
||||
r'<link\s+rel="canonical"\s+href="https://ttvdrops\.lovinator\.space/custom-page/"\s*/?>',
|
||||
)
|
||||
assert canonical_pattern.search(content) is not None
|
||||
|
||||
|
||||
def test_meta_tags_twitter_card_is_summary_without_image() -> None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue