@@ -18,7 +18,7 @@ from django.http.response import HttpResponseBase
18
18
from django .template .base import Template
19
19
from django .test .utils import ContextList
20
20
from django .urls import ResolverMatch
21
- from django .utils .functional import cached_property
21
+ from django .utils .functional import _StrOrPromise , cached_property
22
22
23
23
BOUNDARY : str
24
24
MULTIPART_CONTENT : str
@@ -88,7 +88,7 @@ class _RequestFactory(Generic[_T]):
88
88
def request (self , ** request : Any ) -> _T : ...
89
89
def get (
90
90
self ,
91
- path : str ,
91
+ path : _StrOrPromise ,
92
92
data : _GetDataType = ...,
93
93
secure : bool = ...,
94
94
* ,
@@ -98,7 +98,7 @@ class _RequestFactory(Generic[_T]):
98
98
) -> _T : ...
99
99
def post (
100
100
self ,
101
- path : str ,
101
+ path : _StrOrPromise ,
102
102
data : Any = ...,
103
103
content_type : str = ...,
104
104
secure : bool = ...,
@@ -109,7 +109,7 @@ class _RequestFactory(Generic[_T]):
109
109
) -> _T : ...
110
110
def head (
111
111
self ,
112
- path : str ,
112
+ path : _StrOrPromise ,
113
113
data : Any = ...,
114
114
secure : bool = ...,
115
115
* ,
@@ -119,7 +119,7 @@ class _RequestFactory(Generic[_T]):
119
119
) -> _T : ...
120
120
def trace (
121
121
self ,
122
- path : str ,
122
+ path : _StrOrPromise ,
123
123
secure : bool = ...,
124
124
* ,
125
125
headers : Mapping [str , Any ] | None = ...,
@@ -128,7 +128,7 @@ class _RequestFactory(Generic[_T]):
128
128
) -> _T : ...
129
129
def options (
130
130
self ,
131
- path : str ,
131
+ path : _StrOrPromise ,
132
132
data : dict [str , str ] | str = ...,
133
133
content_type : str = ...,
134
134
secure : bool = ...,
@@ -139,7 +139,7 @@ class _RequestFactory(Generic[_T]):
139
139
) -> _T : ...
140
140
def put (
141
141
self ,
142
- path : str ,
142
+ path : _StrOrPromise ,
143
143
data : Any = ...,
144
144
content_type : str = ...,
145
145
secure : bool = ...,
@@ -150,7 +150,7 @@ class _RequestFactory(Generic[_T]):
150
150
) -> _T : ...
151
151
def patch (
152
152
self ,
153
- path : str ,
153
+ path : _StrOrPromise ,
154
154
data : Any = ...,
155
155
content_type : str = ...,
156
156
secure : bool = ...,
@@ -161,7 +161,7 @@ class _RequestFactory(Generic[_T]):
161
161
) -> _T : ...
162
162
def delete (
163
163
self ,
164
- path : str ,
164
+ path : _StrOrPromise ,
165
165
data : Any = ...,
166
166
content_type : str = ...,
167
167
secure : bool = ...,
@@ -173,7 +173,7 @@ class _RequestFactory(Generic[_T]):
173
173
def generic (
174
174
self ,
175
175
method : str ,
176
- path : str ,
176
+ path : _StrOrPromise ,
177
177
data : Any = ...,
178
178
content_type : str | None = ...,
179
179
secure : bool = ...,
@@ -283,7 +283,7 @@ class Client(ClientMixin, _RequestFactory[_MonkeyPatchedWSGIResponse]):
283
283
def request (self , ** request : Any ) -> _MonkeyPatchedWSGIResponse : ...
284
284
def get ( # type: ignore[override]
285
285
self ,
286
- path : str ,
286
+ path : _StrOrPromise ,
287
287
data : _GetDataType = ...,
288
288
follow : bool = ...,
289
289
secure : bool = ...,
@@ -294,7 +294,7 @@ class Client(ClientMixin, _RequestFactory[_MonkeyPatchedWSGIResponse]):
294
294
) -> _MonkeyPatchedWSGIResponse : ...
295
295
def post ( # type: ignore[override]
296
296
self ,
297
- path : str ,
297
+ path : _StrOrPromise ,
298
298
data : Any = ...,
299
299
content_type : str = ...,
300
300
follow : bool = ...,
@@ -306,7 +306,7 @@ class Client(ClientMixin, _RequestFactory[_MonkeyPatchedWSGIResponse]):
306
306
) -> _MonkeyPatchedWSGIResponse : ...
307
307
def head ( # type: ignore[override]
308
308
self ,
309
- path : str ,
309
+ path : _StrOrPromise ,
310
310
data : Any = ...,
311
311
follow : bool = ...,
312
312
secure : bool = ...,
@@ -317,7 +317,7 @@ class Client(ClientMixin, _RequestFactory[_MonkeyPatchedWSGIResponse]):
317
317
) -> _MonkeyPatchedWSGIResponse : ...
318
318
def options ( # type: ignore[override]
319
319
self ,
320
- path : str ,
320
+ path : _StrOrPromise ,
321
321
data : dict [str , str ] | str = ...,
322
322
content_type : str = ...,
323
323
follow : bool = ...,
@@ -329,7 +329,7 @@ class Client(ClientMixin, _RequestFactory[_MonkeyPatchedWSGIResponse]):
329
329
) -> _MonkeyPatchedWSGIResponse : ...
330
330
def put ( # type: ignore[override]
331
331
self ,
332
- path : str ,
332
+ path : _StrOrPromise ,
333
333
data : Any = ...,
334
334
content_type : str = ...,
335
335
follow : bool = ...,
@@ -341,7 +341,7 @@ class Client(ClientMixin, _RequestFactory[_MonkeyPatchedWSGIResponse]):
341
341
) -> _MonkeyPatchedWSGIResponse : ...
342
342
def patch ( # type: ignore[override]
343
343
self ,
344
- path : str ,
344
+ path : _StrOrPromise ,
345
345
data : Any = ...,
346
346
content_type : str = ...,
347
347
follow : bool = ...,
@@ -353,7 +353,7 @@ class Client(ClientMixin, _RequestFactory[_MonkeyPatchedWSGIResponse]):
353
353
) -> _MonkeyPatchedWSGIResponse : ...
354
354
def delete ( # type: ignore[override]
355
355
self ,
356
- path : str ,
356
+ path : _StrOrPromise ,
357
357
data : Any = ...,
358
358
content_type : str = ...,
359
359
follow : bool = ...,
@@ -365,7 +365,7 @@ class Client(ClientMixin, _RequestFactory[_MonkeyPatchedWSGIResponse]):
365
365
) -> _MonkeyPatchedWSGIResponse : ...
366
366
def trace ( # type: ignore[override]
367
367
self ,
368
- path : str ,
368
+ path : _StrOrPromise ,
369
369
data : Any = ...,
370
370
follow : bool = ...,
371
371
secure : bool = ...,
@@ -393,7 +393,7 @@ class AsyncClient(ClientMixin, _AsyncRequestFactory[Awaitable[_MonkeyPatchedASGI
393
393
async def request (self , ** request : Any ) -> _MonkeyPatchedASGIResponse : ...
394
394
async def get ( # type: ignore[override]
395
395
self ,
396
- path : str ,
396
+ path : _StrOrPromise ,
397
397
data : _GetDataType = ...,
398
398
follow : bool = ...,
399
399
secure : bool = ...,
@@ -404,7 +404,7 @@ class AsyncClient(ClientMixin, _AsyncRequestFactory[Awaitable[_MonkeyPatchedASGI
404
404
) -> _MonkeyPatchedASGIResponse : ...
405
405
async def post ( # type: ignore[override]
406
406
self ,
407
- path : str ,
407
+ path : _StrOrPromise ,
408
408
data : Any = ...,
409
409
content_type : str = ...,
410
410
follow : bool = ...,
@@ -416,7 +416,7 @@ class AsyncClient(ClientMixin, _AsyncRequestFactory[Awaitable[_MonkeyPatchedASGI
416
416
) -> _MonkeyPatchedASGIResponse : ...
417
417
async def head ( # type: ignore[override]
418
418
self ,
419
- path : str ,
419
+ path : _StrOrPromise ,
420
420
data : Any = ...,
421
421
follow : bool = ...,
422
422
secure : bool = ...,
@@ -427,7 +427,7 @@ class AsyncClient(ClientMixin, _AsyncRequestFactory[Awaitable[_MonkeyPatchedASGI
427
427
) -> _MonkeyPatchedASGIResponse : ...
428
428
async def options ( # type: ignore[override]
429
429
self ,
430
- path : str ,
430
+ path : _StrOrPromise ,
431
431
data : dict [str , str ] | str = ...,
432
432
content_type : str = ...,
433
433
follow : bool = ...,
@@ -439,7 +439,7 @@ class AsyncClient(ClientMixin, _AsyncRequestFactory[Awaitable[_MonkeyPatchedASGI
439
439
) -> _MonkeyPatchedASGIResponse : ...
440
440
async def put ( # type: ignore[override]
441
441
self ,
442
- path : str ,
442
+ path : _StrOrPromise ,
443
443
data : Any = ...,
444
444
content_type : str = ...,
445
445
follow : bool = ...,
@@ -451,7 +451,7 @@ class AsyncClient(ClientMixin, _AsyncRequestFactory[Awaitable[_MonkeyPatchedASGI
451
451
) -> _MonkeyPatchedASGIResponse : ...
452
452
async def patch ( # type: ignore[override]
453
453
self ,
454
- path : str ,
454
+ path : _StrOrPromise ,
455
455
data : Any = ...,
456
456
content_type : str = ...,
457
457
follow : bool = ...,
@@ -463,7 +463,7 @@ class AsyncClient(ClientMixin, _AsyncRequestFactory[Awaitable[_MonkeyPatchedASGI
463
463
) -> _MonkeyPatchedASGIResponse : ...
464
464
async def delete ( # type: ignore[override]
465
465
self ,
466
- path : str ,
466
+ path : _StrOrPromise ,
467
467
data : Any = ...,
468
468
content_type : str = ...,
469
469
follow : bool = ...,
@@ -475,7 +475,7 @@ class AsyncClient(ClientMixin, _AsyncRequestFactory[Awaitable[_MonkeyPatchedASGI
475
475
) -> _MonkeyPatchedASGIResponse : ...
476
476
async def trace ( # type: ignore[override]
477
477
self ,
478
- path : str ,
478
+ path : _StrOrPromise ,
479
479
data : Any = ...,
480
480
follow : bool = ...,
481
481
secure : bool = ...,
0 commit comments