- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 47 for tenders (0.08 sec)
-
tests/test_tutorial/test_security/test_tutorial005.py
assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" def test_token(mod: ModuleType): client = TestClient(mod.app) access_token = get_access_token(scope="me", client=client) response = client.get( "/users/me", headers={"Authorization": f"Bearer {access_token}"} ) assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 15.8K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial007.py
assert response.status_code == 401, response.text assert response.headers["WWW-Authenticate"] == "Basic" def test_security_http_basic_invalid_credentials(client: TestClient): response = client.get( "/users/me", headers={"Authorization": "Basic notabase64token"} ) assert response.status_code == 401, response.text assert response.headers["WWW-Authenticate"] == "Basic"Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 3.2K bytes - Viewed (0) -
tests/test_request_params/test_header/test_optional_list.py
@pytest.mark.parametrize( "path", ["/optional-list-str", "/model-optional-list-str"], ) def test_optional_list_str(path: str): client = TestClient(app) response = client.get(path, headers=[("p", "hello"), ("p", "world")]) assert response.status_code == 200 assert response.json() == {"p": ["hello", "world"]} # =====================================================================================
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 9.3K bytes - Viewed (0) -
fastapi/datastructures.py
filename: Annotated[Optional[str], Doc("The original file name.")] size: Annotated[Optional[int], Doc("The size of the file in bytes.")] headers: Annotated[Headers, Doc("The headers of the request.")] content_type: Annotated[ Optional[str], Doc("The content type of the request, from the headers.") ] async def write( self, data: Annotated[ bytes, Doc( """
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 5.1K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial003.py
response = client.get("/users/me", headers={"Authorization": "Bearer nonexistent"}) assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" def test_incorrect_token_type(client: TestClient): response = client.get( "/users/me", headers={"Authorization": "Notexistent testtoken"} )
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 7.7K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial012.py
def test_get_invalid_one_header_items(client: TestClient): response = client.get("/items/", headers={"X-Token": "invalid"}) assert response.status_code == 400, response.text assert response.json() == {"detail": "X-Token header invalid"} def test_get_invalid_one_users(client: TestClient): response = client.get("/users/", headers={"X-Token": "invalid"}) assert response.status_code == 400, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 7.7K bytes - Viewed (0) -
tests/test_request_params/test_header/test_list.py
} @pytest.mark.parametrize( "path", ["/required-list-str", "/model-required-list-str"], ) def test_required_list_str(path: str): client = TestClient(app) response = client.get(path, headers=[("p", "hello"), ("p", "world")]) assert response.status_code == 200 assert response.json() == {"p": ["hello", "world"]} # =====================================================================================
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:31:34 UTC 2025 - 11K bytes - Viewed (0) -
tests/test_tutorial/test_bigger_applications/test_main.py
response = client.get( "/items?token=jessica", headers={"X-Token": "fake-super-secret-token"} ) assert response.status_code == 200 assert response.json() == { "plumbus": {"name": "Plumbus"}, "gun": {"name": "Portal Gun"}, } def test_items_with_no_token_jessica(client: TestClient): response = client.get("/items", headers={"X-Token": "fake-super-secret-token"})
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 21.3K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial001.py
return client @pytest.mark.parametrize( "path,headers,expected_status,expected_response", [ ("/items", None, 200, {"User-Agent": "testclient"}), ("/items", {"X-Header": "notvalid"}, 200, {"User-Agent": "testclient"}), ("/items", {"User-Agent": "FastAPI test"}, 200, {"User-Agent": "FastAPI test"}), ], ) def test(path, headers, expected_status, expected_response, client: TestClient):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 3.9K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial002.py
{"strange-header": "Not really underscore"}, 200, {"strange_header": None}, ), ], ) def test(path, headers, expected_status, expected_response, client: TestClient): response = client.get(path, headers=headers) assert response.status_code == expected_status assert response.json() == expected_response def test_openapi_schema(client: TestClient):Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 4.1K bytes - Viewed (0)