- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 30 for foo_bar (0.04 seconds)
-
tests/test_security_http_base.py
client = TestClient(app) def test_security_http_base(): response = client.get("/users/me", headers={"Authorization": "Other foobar"}) assert response.status_code == 200, response.text assert response.json() == {"scheme": "Other", "credentials": "foobar"} def test_security_http_base_no_credentials(): response = client.get("/users/me") assert response.status_code == 401, response.text
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 24 19:03:06 GMT 2025 - 1.8K bytes - Click Count (0) -
tests/test_path.py
def test_path_foobar(): response = client.get("/path/foobar") assert response.status_code == 200 assert response.json() == "foobar" def test_path_str_foobar(): response = client.get("/path/str/foobar") assert response.status_code == 200 assert response.json() == "foobar" def test_path_str_42(): response = client.get("/path/str/42")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 20.5K bytes - Click Count (2) -
tests/test_security_http_base_description.py
client = TestClient(app) def test_security_http_base(): response = client.get("/users/me", headers={"Authorization": "Other foobar"}) assert response.status_code == 200, response.text assert response.json() == {"scheme": "Other", "credentials": "foobar"} def test_security_http_base_no_credentials(): response = client.get("/users/me") assert response.status_code == 401, response.text
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 24 19:03:06 GMT 2025 - 2K bytes - Click Count (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial012.py
assert response.json() == {"q": ["foo", "bar"]} def test_multi_query_values(client: TestClient): url = "/items/?q=baz&q=foobar" response = client.get(url) assert response.status_code == 200, response.text assert response.json() == {"q": ["baz", "foobar"]} def test_openapi_schema(client: TestClient): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 3.7K bytes - Click Count (0) -
tests/test_security_http_digest.py
client = TestClient(app) def test_security_http_digest(): response = client.get("/users/me", headers={"Authorization": "Digest foobar"}) 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 == 401, response.text
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 24 19:03:06 GMT 2025 - 2.1K bytes - Click Count (0) -
tests/test_security_http_bearer.py
client = TestClient(app) def test_security_http_bearer(): response = client.get("/users/me", headers={"Authorization": "Bearer foobar"}) 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 == 401, response.text
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 24 19:03:06 GMT 2025 - 2.1K bytes - Click Count (0) -
tests/test_security_http_bearer_description.py
client = TestClient(app) def test_security_http_bearer(): response = client.get("/users/me", headers={"Authorization": "Bearer foobar"}) 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 == 401, response.text
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 24 19:03:06 GMT 2025 - 2.3K bytes - Click Count (0) -
tests/test_security_http_digest_description.py
client = TestClient(app) def test_security_http_digest(): response = client.get("/users/me", headers={"Authorization": "Digest foobar"}) 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 == 401, response.text
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Mon Nov 24 19:03:06 GMT 2025 - 2.3K bytes - Click Count (0) -
docs_src/app_testing/app_b_py39/test_main.py
def test_create_item(): response = client.post( "/items/", headers={"X-Token": "coneofsilence"}, json={"id": "foobar", "title": "Foo Bar", "description": "The Foo Barters"}, ) assert response.status_code == 200 assert response.json() == { "id": "foobar", "title": "Foo Bar", "description": "The Foo Barters", } def test_create_item_bad_token():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.8K bytes - Click Count (0) -
docs/en/docs/tutorial/security/first-steps.md
* So, to authenticate with our API, it sends a header `Authorization` with a value of `Bearer ` plus the token. * If the token contains `foobar`, the content of the `Authorization` header would be: `Bearer foobar`. ## **FastAPI**'s `OAuth2PasswordBearer` { #fastapis-oauth2passwordbearer } **FastAPI** provides several tools, at different levels of abstraction, to implement these security features.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sun Aug 31 09:15:41 GMT 2025 - 8.4K bytes - Click Count (0)