From adb26248dbe44d3e3a3fdd72240f46d38b616701 Mon Sep 17 00:00:00 2001 From: Petter Friberg Date: Mon, 24 Oct 2022 23:50:08 +0200 Subject: [PATCH] Allow `assertQuerySetEqual` to compare with a collection of values (#1201) --- django-stubs/test/testcases.pyi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/django-stubs/test/testcases.pyi b/django-stubs/test/testcases.pyi index 353b32e..d42abf7 100644 --- a/django-stubs/test/testcases.pyi +++ b/django-stubs/test/testcases.pyi @@ -5,6 +5,7 @@ from types import TracebackType from typing import ( Any, Callable, + Collection, Dict, Iterable, Iterator, @@ -200,8 +201,8 @@ class TransactionTestCase(SimpleTestCase): def assertQuerysetEqual( self, qs: Union[Iterator[Any], List[Model], QuerySet, RawQuerySet], - values: Union[List[None], List[Tuple[str, str]], List[date], List[int], List[str], Set[str], QuerySet], - transform: Union[Callable, Type[str]] = ..., + values: Collection[Any], + transform: Union[Callable[[Model], Any], Type[str]] = ..., ordered: bool = ..., msg: Optional[str] = ..., ) -> None: ...