Fix pyright attribute access issues in test_sitemaps and fix import in views
This commit is contained in:
parent
7478d4c851
commit
8dfcd118e5
2 changed files with 3 additions and 3 deletions
|
|
@ -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"),
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue