mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-13 15:31:55 +08:00
Allow assertQuerySetEqual to compare with a collection of values (#1201)
This commit is contained in:
@@ -5,6 +5,7 @@ from types import TracebackType
|
|||||||
from typing import (
|
from typing import (
|
||||||
Any,
|
Any,
|
||||||
Callable,
|
Callable,
|
||||||
|
Collection,
|
||||||
Dict,
|
Dict,
|
||||||
Iterable,
|
Iterable,
|
||||||
Iterator,
|
Iterator,
|
||||||
@@ -200,8 +201,8 @@ class TransactionTestCase(SimpleTestCase):
|
|||||||
def assertQuerysetEqual(
|
def assertQuerysetEqual(
|
||||||
self,
|
self,
|
||||||
qs: Union[Iterator[Any], List[Model], QuerySet, RawQuerySet],
|
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],
|
values: Collection[Any],
|
||||||
transform: Union[Callable, Type[str]] = ...,
|
transform: Union[Callable[[Model], Any], Type[str]] = ...,
|
||||||
ordered: bool = ...,
|
ordered: bool = ...,
|
||||||
msg: Optional[str] = ...,
|
msg: Optional[str] = ...,
|
||||||
) -> None: ...
|
) -> None: ...
|
||||||
|
|||||||
Reference in New Issue
Block a user