response.pyi 996 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Stubs for requests_mock.response
  2. import io
  3. from typing import Any, Dict
  4. from requests import Request, Response
  5. from requests.cookies import RequestsCookieJar
  6. class CookieJar(RequestsCookieJar):
  7. def set(self, name: Any, value: Any, **kwargs: Any) -> Any: ...
  8. class _FakeConnection:
  9. def send(self, request: Any, **kwargs: Any) -> None: ...
  10. def close(self) -> None: ...
  11. class _IOReader(io.BytesIO):
  12. def read(self, *args: Any, **kwargs: Any) -> Any: ...
  13. def create_response(request: Any, **kwargs: Any) -> Response: ...
  14. class _Context:
  15. headers: Dict[str,str] = ...
  16. status_code: int = ...
  17. reason: str = ...
  18. cookies: Any = ...
  19. def __init__(self,
  20. headers: Dict[str, str],
  21. status_code: int,
  22. reason: str,
  23. cookies: Any) -> None: ...
  24. class _MatcherResponse:
  25. def __init__(self, **kwargs: Any) -> None: ...
  26. def get_response(self, request: Request) -> Response: ...
  27. Context = _Context