Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions django-stubs/test/client.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class _MonkeyPatchedWSGIResponse(_WSGIResponse):
client: Client
templates: List[Template]
context: List[Dict[str, Any]]
content: bytes
resolver_match: ResolverMatch

class _MonkeyPatchedASGIResponse(_ASGIResponse):
Expand All @@ -134,6 +135,7 @@ class _MonkeyPatchedASGIResponse(_ASGIResponse):
client: AsyncClient
templates: List[Template]
context: List[Dict[str, Any]]
content: bytes
resolver_match: ResolverMatch

class ClientMixin:
Expand Down
2 changes: 2 additions & 0 deletions tests/typecheck/test/test_client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
reveal_type(response.templates) # N: Revealed type is "builtins.list[django.template.base.Template]"
reveal_type(response.client) # N: Revealed type is "django.test.client.Client"
reveal_type(response.context) # N: Revealed type is "builtins.list[builtins.dict[builtins.str, Any]]"
reveal_type(response.content) # N: Revealed type is "builtins.bytes"
response.json()
- case: async_client_methods
main: |
Expand All @@ -20,6 +21,7 @@
reveal_type(response.templates) # N: Revealed type is "builtins.list[django.template.base.Template]"
reveal_type(response.client) # N: Revealed type is "django.test.client.AsyncClient"
reveal_type(response.context) # N: Revealed type is "builtins.list[builtins.dict[builtins.str, Any]]"
reveal_type(response.content) # N: Revealed type is "builtins.bytes"
response.json()
- case: request_factories
main: |
Expand Down