diff --git a/django-stubs/contrib/messages/test.pyi b/django-stubs/contrib/messages/test.pyi new file mode 100644 index 000000000..e680d9548 --- /dev/null +++ b/django-stubs/contrib/messages/test.pyi @@ -0,0 +1,9 @@ +from typing import Any + +from django.contrib.messages.storage.base import BaseStorage +from django.http.response import HttpResponse + +class MessagesTestMixin: + def assertMessages( + self, response: HttpResponse, expected_messages: list[Any] | BaseStorage, *, ordered: bool = ... + ) -> None: ... diff --git a/scripts/stubtest/allowlist_todo_django50.txt b/scripts/stubtest/allowlist_todo_django50.txt index 2818f0ace..9da15e5aa 100644 --- a/scripts/stubtest/allowlist_todo_django50.txt +++ b/scripts/stubtest/allowlist_todo_django50.txt @@ -28,7 +28,6 @@ django.contrib.gis.management django.contrib.gis.management.commands django.contrib.gis.management.commands.inspectdb django.contrib.gis.management.commands.ogrinspect -django.contrib.messages.test django.db.backends.mysql.features.DatabaseFeatures.allows_group_by_selected_pks django.db.backends.mysql.features.DatabaseFeatures.has_native_uuid_field django.db.backends.mysql.features.DatabaseFeatures.supports_expression_defaults diff --git a/tests/typecheck/test_import_all.yml b/tests/typecheck/test_import_all.yml index fa943ef02..f35775b39 100644 --- a/tests/typecheck/test_import_all.yml +++ b/tests/typecheck/test_import_all.yml @@ -234,6 +234,7 @@ import django.contrib.messages.storage.session import django.contrib.messages.utils import django.contrib.messages.views + import django.contrib.messages.test import django.contrib.postgres import django.contrib.postgres.aggregates import django.contrib.postgres.aggregates.general