- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for parametrizar (0.11 sec)
-
docs/pt/docs/advanced/advanced-dependencies.md
## Parametrizar a instância E agora, nós podemos utilizar o `__init__` para declarar os parâmetros da instância que podemos utilizar para "parametrizar" a dependência: //// tab | Python 3.9+ ```Python hl_lines="9" {!> ../../docs_src/dependencies/tutorial011_an_py39.py!} ``` ////
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.1K bytes - Viewed (0) -
tests/test_allow_inf_nan_in_enforcing.py
@pytest.mark.parametrize( "value,code", [ ("-1", 200), ("inf", 200), ("-inf", 200), ("nan", 200), ("0", 200), ("342", 200), ], ) def test_allow_inf_nan_param_default(value: str, code: int): response = client.post(f"/?z={value}") assert response.status_code == code, response.text @pytest.mark.parametrize( "value,code", [
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 24 19:27:37 UTC 2024 - 1.8K bytes - Viewed (0) -
tests/test_param_include_in_schema.py
def test_openapi_schema(): client = TestClient(app) response = client.get("/openapi.json") assert response.status_code == 200 assert response.json() == openapi_schema @pytest.mark.parametrize( "path,cookies,expected_status,expected_response", [ ( "/hidden_cookie", {}, 200, {"hidden_cookie": None}, ), (
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 7.4K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial003.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.header_params.tutorial003 import app client = TestClient(app) @pytest.mark.parametrize( "path,headers,expected_status,expected_response", [ ("/items", None, 200, {"X-Token values": None}), ("/items", {"x-token": "foo"}, 200, {"X-Token values": ["foo"]}), ( "/items",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 12 14:52:00 UTC 2024 - 4.1K bytes - Viewed (0) -
tests/test_computed_fields.py
@app.get("/responses", responses={200: {"model": Rectangle}}) def read_responses() -> Rectangle: return Rectangle(width=3, length=4) client = TestClient(app) return client @pytest.mark.parametrize("path", ["/", "/responses"]) @needs_pydanticv2 def test_get(client: TestClient, path: str): response = client.get(path) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 12 09:44:57 UTC 2024 - 3K bytes - Viewed (0) -
docs/az/docs/index.md
* Hər iki _yolda_ `GET` əməliyyatlarını (həmçinin HTTP _metodları_ kimi bilinir) aparır. * `/items/{item_id}` _yolu_ `item_id` adlı `int` qiyməti almalı olan _yol parametrinə_ sahibdir. * `/items/{item_id}` _yolunun_ `q` adlı yol parametri var və bu parametr istəyə bağlı olsa da, `str` qiymətini almalıdır. ### İnteraktiv API Sənədləri
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 22.8K bytes - Viewed (0) -
tests/test_annotated.py
"msg": "ensure this value has at least 1 characters", "type": "value_error.any_str.min_length", } ) ] } @pytest.mark.parametrize( "path,expected_status,expected_response", [ ("/default", 200, {"foo": "foo"}), ("/default?foo=bar", 200, {"foo": "bar"}), ("/required?foo=bar", 200, {"foo": "bar"}),
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 10.2K bytes - Viewed (0) -
tests/test_dependency_overrides.py
response = client.get("/router-decorator-depends/?q=foo&skip=100&limit=200") assert response.status_code == 200 assert response.json() == {"in": "router-decorator-depends"} @pytest.mark.parametrize( "url,status_code,expected", [ ( "/main-depends/", 200, {"in": "main-depends", "params": {"q": None, "skip": 5, "limit": 10}}, ), (
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 15.4K bytes - Viewed (0) -
cmd/admin-handlers_test.go
err = signRequestV4(req, cred.AccessKey, cred.SecretKey) if err != nil { return nil, err } return req, nil } // testServicesCmdHandler - parametrizes service subcommand tests on // cmdType value. func testServicesCmdHandler(cmd cmdType, t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 24 10:24:01 UTC 2024 - 13.9K bytes - Viewed (0) -
tests/test_application.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from .main import app client = TestClient(app) @pytest.mark.parametrize( "path,expected_status,expected_response", [ ("/api_route", 200, {"message": "Hello World"}), ("/non_decorated_route", 200, {"message": "Hello World"}), ("/nonexistent", 404, {"detail": "Not Found"}), ], )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 21:56:59 UTC 2024 - 52.2K bytes - Viewed (0)