- Sort Score
- Result 10 results
- Languages All
Results 101 - 110 of 1,102 for texi (0.05 sec)
-
tests/test_tutorial/test_security/test_tutorial001.py
response = client.get("/items") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" def test_token(): response = client.get("/items", headers={"Authorization": "Bearer testtoken"}) assert response.status_code == 200, response.text assert response.json() == {"token": "testtoken"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.9K bytes - Viewed (0) -
tests/test_tutorial/test_cors/test_tutorial001.py
"Access-Control-Request-Method": "GET", "Access-Control-Request-Headers": "X-Example", } response = client.options("/", headers=headers) assert response.status_code == 200, response.text assert response.text == "OK" assert ( response.headers["access-control-allow-origin"] == "https://localhost.tiangolo.com" ) assert response.headers["access-control-allow-headers"] == "X-Example"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jul 09 18:06:12 UTC 2020 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008c_an_py39.py
response = client.get("/items/foo") assert response.status_code == 404, response.text assert response.json() == {"detail": "Item not found, there's only a plumbus here"} @needs_py39 def test_get(client: TestClient): response = client.get("/items/plumbus") assert response.status_code == 200, response.text assert response.json() == "plumbus" @needs_py39
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial001_an_py39.py
response = client.post("/uploadfile/", files={"file": file}) assert response.status_code == 200, response.text assert response.json() == {"filename": "test.txt"} @needs_py39 def test_openapi_schema(client: TestClient): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 7.7K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial006.py
assert response.status_code == 400, response.text assert response.json() == {"detail": "X-Token header invalid"} def test_get_invalid_second_header(): response = client.get( "/items/", headers={"X-Token": "fake-super-secret-token", "X-Key": "invalid"} ) assert response.status_code == 400, response.text assert response.json() == {"detail": "X-Key header invalid"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 5K bytes - Viewed (0) -
tests/test_security_http_bearer_optional.py
assert response.status_code == 200, response.text assert response.json() == {"scheme": "Bearer", "credentials": "foobar"} def test_security_http_bearer_no_credentials(): response = client.get("/users/me") assert response.status_code == 200, response.text assert response.json() == {"msg": "Create an account first"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
tests/test_security_oauth2_authorization_code_bearer_description.py
def test_no_token(): response = client.get("/items") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} def test_incorrect_token(): response = client.get("/items", headers={"Authorization": "Non-existent testtoken"}) assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"} def test_token():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.4K bytes - Viewed (0) -
tests/test_security_oauth2_password_bearer_optional.py
def test_no_token(): response = client.get("/items") assert response.status_code == 200, response.text assert response.json() == {"msg": "Create an account first"} def test_token(): response = client.get("/items", headers={"Authorization": "Bearer testtoken"}) assert response.status_code == 200, response.text assert response.json() == {"token": "testtoken"} def test_incorrect_token():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
tests/test_tutorial/test_testing_dependencies/test_tutorial001_py310.py
assert response.status_code == 200, response.text assert response.json() == { "message": "Hello Users!", "params": {"q": None, "skip": 5, "limit": 10}, } @needs_py310 def test_override_in_users_with_q(): from docs_src.dependency_testing.tutorial001_py310 import client response = client.get("/users/?q=foo") assert response.status_code == 200, response.text assert response.json() == {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 2K bytes - Viewed (0) -
tests/test_security_http_digest.py
assert response.status_code == 200, response.text assert response.json() == {"scheme": "Digest", "credentials": "foobar"} def test_security_http_digest_no_credentials(): response = client.get("/users/me") assert response.status_code == 403, response.text assert response.json() == {"detail": "Not authenticated"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2K bytes - Viewed (0)