File: types.py

package info (click to toggle)
starlette 0.50.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,072 kB
  • sloc: python: 13,532; sh: 35; makefile: 6
file content (27 lines) | stat: -rw-r--r-- 777 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from __future__ import annotations

from typing import TYPE_CHECKING, Protocol

import httpx

from starlette.testclient import TestClient
from starlette.types import ASGIApp

if TYPE_CHECKING:

    class TestClientFactory(Protocol):  # pragma: no cover
        def __call__(
            self,
            app: ASGIApp,
            base_url: str = "http://testserver",
            raise_server_exceptions: bool = True,
            root_path: str = "",
            cookies: httpx._types.CookieTypes | None = None,
            headers: dict[str, str] | None = None,
            follow_redirects: bool = True,
            client: tuple[str, int] = ("testclient", 50000),
        ) -> TestClient: ...
else:  # pragma: no cover

    class TestClientFactory:
        __test__ = False