Speed up tests
This commit is contained in:
23
tests/view_test.py
Normal file
23
tests/view_test.py
Normal 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
|
Reference in New Issue
Block a user