Fix tests

This commit is contained in:
2024-12-11 22:37:26 +01:00
parent d12dd7678b
commit b0966e7664
7 changed files with 3 additions and 144 deletions

23
core/tests/view_test.py Normal file
View File

@ -0,0 +1,23 @@
"""Tests for the views in the core app."""
from __future__ import annotations
from typing import TYPE_CHECKING
import pytest
from django.http import HttpResponse
from django.urls import reverse
if TYPE_CHECKING:
from django.test import Client
from django.test.client import _MonkeyPatchedWSGIResponse # type: ignore[import]
@pytest.mark.django_db
def test_index_view(client: Client) -> None:
"""Test index view."""
url: str = reverse(viewname="index")
response: _MonkeyPatchedWSGIResponse = client.get(url)
assert isinstance(response, HttpResponse)
assert response.status_code == 200