diff --git a/AUTHORS b/AUTHORS index 060864a4..1e01a483 100644 --- a/AUTHORS +++ b/AUTHORS @@ -20,3 +20,4 @@ Nicolas Delaby Hasan Ramezani Michael Howitz Mark Gensler +Pavel Taufer diff --git a/pytest_django/asserts.py b/pytest_django/asserts.py index 09f9d8d6..1a1289d9 100644 --- a/pytest_django/asserts.py +++ b/pytest_django/asserts.py @@ -55,6 +55,7 @@ def assertion_func(*args, **kwargs): if TYPE_CHECKING: from django.http.response import HttpResponseBase + import django.forms as forms def assertRedirects( response: HttpResponseBase, @@ -93,8 +94,7 @@ def assertNotContains( ... def assertFormError( - response: HttpResponseBase, - form: str, + form: forms.BaseForm, field: str | None, errors: str | Sequence[str], msg_prefix: str = ..., @@ -102,8 +102,7 @@ def assertFormError( ... def assertFormsetError( - response: HttpResponseBase, - formset: str, + formset: forms.BaseFormSet, form_index: int | None, field: str | None, errors: str | Sequence[str],