Skip to content

Commit

Permalink
5.0: Update django.test (#2005)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngnpope authored Mar 14, 2024
1 parent 79a9051 commit 0d95977
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 18 deletions.
85 changes: 85 additions & 0 deletions django-stubs/test/client.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -311,3 +311,88 @@ class AsyncClient(ClientMixin, _AsyncRequestFactory[Awaitable[_MonkeyPatchedASGI
**defaults: Any,
) -> None: ...
async def request(self, **request: Any) -> _MonkeyPatchedASGIResponse: ...
async def get( # type: ignore[override]
self,
path: str,
data: _GetDataType = ...,
follow: bool = ...,
secure: bool = ...,
*,
headers: Mapping[str, Any] | None = ...,
**extra: Any,
) -> _MonkeyPatchedASGIResponse: ...
async def post( # type: ignore[override]
self,
path: str,
data: Any = ...,
content_type: str = ...,
follow: bool = ...,
secure: bool = ...,
*,
headers: Mapping[str, Any] | None = ...,
**extra: Any,
) -> _MonkeyPatchedASGIResponse: ...
async def head( # type: ignore[override]
self,
path: str,
data: Any = ...,
follow: bool = ...,
secure: bool = ...,
*,
headers: Mapping[str, Any] | None = ...,
**extra: Any,
) -> _MonkeyPatchedASGIResponse: ...
async def options( # type: ignore[override]
self,
path: str,
data: dict[str, str] | str = ...,
content_type: str = ...,
follow: bool = ...,
secure: bool = ...,
*,
headers: Mapping[str, Any] | None = ...,
**extra: Any,
) -> _MonkeyPatchedASGIResponse: ...
async def put( # type: ignore[override]
self,
path: str,
data: Any = ...,
content_type: str = ...,
follow: bool = ...,
secure: bool = ...,
*,
headers: Mapping[str, Any] | None = ...,
**extra: Any,
) -> _MonkeyPatchedASGIResponse: ...
async def patch( # type: ignore[override]
self,
path: str,
data: Any = ...,
content_type: str = ...,
follow: bool = ...,
secure: bool = ...,
*,
headers: Mapping[str, Any] | None = ...,
**extra: Any,
) -> _MonkeyPatchedASGIResponse: ...
async def delete( # type: ignore[override]
self,
path: str,
data: Any = ...,
content_type: str = ...,
follow: bool = ...,
secure: bool = ...,
*,
headers: Mapping[str, Any] | None = ...,
**extra: Any,
) -> _MonkeyPatchedASGIResponse: ...
async def trace( # type: ignore[override]
self,
path: str,
data: Any = ...,
follow: bool = ...,
secure: bool = ...,
*,
headers: Mapping[str, Any] | None = ...,
**extra: Any,
) -> _MonkeyPatchedASGIResponse: ...
2 changes: 2 additions & 0 deletions django-stubs/test/runner.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class RemoteTestResult:
def stopTestRun(self) -> None: ...
def startTest(self, test: Any) -> None: ...
def stopTest(self, test: Any) -> None: ...
def addDuration(self, test: Any, elapsed: Any) -> None: ...
def addError(self, test: Any, err: Any) -> None: ...
def addFailure(self, test: Any, err: Any) -> None: ...
def addSubTest(self, test: Any, subtest: Any, err: Any) -> None: ...
Expand Down Expand Up @@ -132,6 +133,7 @@ class DiscoverRunner:
timing: bool = ...,
shuffle: int | Literal[False] = ...,
logger: logging.Logger | None = ...,
durations: int | None = ...,
**kwargs: Any,
) -> None: ...
@classmethod
Expand Down
18 changes: 0 additions & 18 deletions scripts/stubtest/allowlist_todo_django50.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,24 +222,6 @@ django.template.Template.__iter__
django.template.autoreload
django.template.base.Template.__iter__
django.template.defaultfilters.escapeseq
django.test.AsyncClient.delete
django.test.AsyncClient.get
django.test.AsyncClient.head
django.test.AsyncClient.options
django.test.AsyncClient.patch
django.test.AsyncClient.post
django.test.AsyncClient.put
django.test.AsyncClient.trace
django.test.client.AsyncClient.delete
django.test.client.AsyncClient.get
django.test.client.AsyncClient.head
django.test.client.AsyncClient.options
django.test.client.AsyncClient.patch
django.test.client.AsyncClient.post
django.test.client.AsyncClient.put
django.test.client.AsyncClient.trace
django.test.runner.DiscoverRunner.__init__
django.test.runner.RemoteTestResult.addDuration
django.utils.choices
django.utils.deprecation.RemovedInDjango50Warning
django.utils.deprecation.RemovedInDjango60Warning
Expand Down

0 comments on commit 0d95977

Please sign in to comment.