- Sort Score
- Num 10 results
- Language All
Results 91 - 100 of 156 for parameterized (0.07 seconds)
-
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}, ), (
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 7.4K bytes - Click Count (0) -
src/test/java/org/codelibs/core/beans/impl/BeanDescImplTest.java
*/ public void testFieldType() throws Exception { BeanDesc bd = BeanDescFactory.getBeanDesc(Hoge.class); PropertyDesc pd = bd.getPropertyDesc("foo"); assertThat(pd.isParameterized(), is(true)); assertThat(pd.getElementClassOfCollection(), is(sameClass(String.class))); ParameterizedClassDesc pcd = pd.getParameterizedClassDesc();Created: Sat Dec 20 08:55:33 GMT 2025 - Last Modified: Fri Jun 20 13:40:57 GMT 2025 - 13.9K bytes - Click Count (0) -
tests/test_computed_fields.py
return client @pytest.mark.parametrize("client", [True, False], indirect=True) @pytest.mark.parametrize("path", ["/", "/responses"]) def test_get(client: TestClient, path: str): response = client.get(path) assert response.status_code == 200, response.text assert response.json() == {"width": 3, "length": 4, "area": 12} @pytest.mark.parametrize("client", [True, False], indirect=True)Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 3.2K bytes - Click Count (0) -
tests/test_request_params/test_path/test_required_str.py
@app.get("/required-alias-and-validation-alias/{p_val_alias}") def read_required_alias_and_validation_alias( p: Annotated[str, Path(alias="p_alias", validation_alias="p_val_alias")], ): return {"p": p} @pytest.mark.parametrize( ("path", "expected_name", "expected_title"), [ pytest.param("/required-str/{p}", "p", "P", id="required-str"), pytest.param(
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 2.3K bytes - Click Count (0) -
src/main/java/org/codelibs/core/beans/impl/PropertyDescImpl.java
} if (valueOfMethod != null) { return MethodUtil.invoke(valueOfMethod, null, arg); } return arg; } @Override public boolean isParameterized() { return parameterizedClassDesc != null && parameterizedClassDesc.isParameterizedClass(); } @Override public ParameterizedClassDesc getParameterizedClassDesc() {Created: Sat Dec 20 08:55:33 GMT 2025 - Last Modified: Thu Jul 24 01:52:43 GMT 2025 - 15.1K bytes - Click Count (0) -
tests/test_file_and_form_order_issue_9116.py
f.write_text("foo") return f @pytest.fixture def tmp_file_2(tmp_path: Path) -> Path: f = tmp_path / "example2.txt" f.write_text("bar") return f @pytest.mark.parametrize("endpoint_path", ("/file_before_form", "/file_after_form")) def test_file_form_order(endpoint_path: str, tmp_file_1: Path): response = client.post( url=endpoint_path, data={"city": "Thimphou"},
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 2.3K bytes - Click Count (0) -
tests/test_modules_same_name_body/test_main.py
from .app.main import app client = TestClient(app) @pytest.mark.parametrize( "path", ["/a/compute", "/a/compute/", "/b/compute", "/b/compute/"] ) def test_post(path): data = {"a": 2, "b": "foo"} response = client.post(path, json=data) assert response.status_code == 200, response.text assert data == response.json() @pytest.mark.parametrize( "path", ["/a/compute", "/a/compute/", "/b/compute", "/b/compute/"]
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Thu Feb 27 14:42:41 GMT 2025 - 5.5K bytes - Click Count (0) -
tests/test_tutorial/test_body/test_tutorial002.py
], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.body.{request.param}") client = TestClient(mod.app) return client @pytest.mark.parametrize("price", ["50.5", 50.5]) def test_post_with_tax(client: TestClient, price: Union[str, float]): response = client.post( "/items/", json={"name": "Foo", "price": price, "description": "Some Foo", "tax": 0.3},
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 5.3K bytes - Click Count (0) -
tests/test_openapi_schema_type.py
from typing import Optional, Union import pytest from fastapi.openapi.models import Schema, SchemaType @pytest.mark.parametrize( "type_value", [ "array", ["string", "null"], None, ], ) def test_allowed_schema_type( type_value: Optional[Union[SchemaType, list[SchemaType]]], ) -> None: """Test that Schema accepts SchemaType, List[SchemaType] and None for type field."""Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 730 bytes - Click Count (0) -
tests/test_tutorial/test_first_steps/test_tutorial001_tutorial002_tutorial003.py
], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.first_steps.{request.param}") client = TestClient(mod.app) return client @pytest.mark.parametrize( "path,expected_status,expected_response", [ ("/", 200, {"message": "Hello World"}), ("/nonexistent", 404, {"detail": "Not Found"}), ], )
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 1.4K bytes - Click Count (0)