Speed up tests

This commit is contained in:
2024-12-12 17:37:00 +01:00
parent cfe6e27a7a
commit 276a9b734a
6 changed files with 7 additions and 0 deletions

23
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