Fix pyright attribute access issues in test_sitemaps and fix import in views

This commit is contained in:
Joakim Hellsén 2026-03-22 00:34:01 +01:00
commit 8dfcd118e5
Signed by: Joakim Hellsén
SSH key fingerprint: SHA256:/9h/CsExpFp+PRhsfA0xznFx2CGfTT5R/kpuFfUgEQk
2 changed files with 3 additions and 3 deletions

View file

@ -23,7 +23,7 @@ def test_sitemap_static_contains_expected_links(
youtube apps as well as some misc static files like /robots.txt. youtube apps as well as some misc static files like /robots.txt.
""" """
# Ensure deterministic BASE_URL # Ensure deterministic BASE_URL
settings.BASE_URL = "https://ttvdrops.lovinator.space" settings.BASE_URL = "https://ttvdrops.lovinator.space" # pyright: ignore[reportAttributeAccessIssue]
response = client.get(reverse("sitemap-static")) response = client.get(reverse("sitemap-static"))
assert response.status_code == 200 assert response.status_code == 200
@ -31,7 +31,7 @@ def test_sitemap_static_contains_expected_links(
locs = _extract_locs(response.content) locs = _extract_locs(response.content)
base = settings.BASE_URL.rstrip("/") base = settings.BASE_URL.rstrip("/") # pyright: ignore[reportAttributeAccessIssue]
expected_paths = [ expected_paths = [
reverse("core:dashboard"), reverse("core:dashboard"),

View file

@ -22,8 +22,8 @@ from django.http import Http404
from django.http import HttpRequest from django.http import HttpRequest
from django.http import HttpResponse from django.http import HttpResponse
from django.shortcuts import render from django.shortcuts import render
from django.shortcuts import reverse
from django.template.defaultfilters import filesizeformat from django.template.defaultfilters import filesizeformat
from django.urls import reverse
from django.utils import timezone from django.utils import timezone
from kick.models import KickChannel from kick.models import KickChannel