- Sort Score
- Num 10 results
- Language All
Results 21 - 30 of 54 for Cruises (0.04 seconds)
-
tests/test_response_model_as_return_annotation.py
def test_response_model_no_annotation_return_invalid_dict(): with pytest.raises(ResponseValidationError) as excinfo: client.get("/response_model-no_annotation-return_invalid_dict") assert "missing" in str(excinfo.value) def test_response_model_no_annotation_return_invalid_model(): with pytest.raises(ResponseValidationError) as excinfo:
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 47.7K bytes - Click Count (0) -
docs/sts/client_grants/sts_element.py
return STSElement(self.root_name, elt) if elt is not None else None def get_child_text(self, name, strict=True): """Extract text of a child element. If strict, and child element is not present, raises InvalidXMLError and otherwise returns None. """ if strict: try: return self.element.find('sts:{}'.format(name), _STS_NS).text
Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Fri Apr 23 18:58:53 GMT 2021 - 2.5K bytes - Click Count (0) -
tests/test_exception_handlers.py
assert response.status_code == 200 assert response.json() == {"exception": "request-validation"} def test_override_server_error_exception_raises(): with pytest.raises(RuntimeError): client.get("/server-error") def test_override_server_error_exception_response(): client = TestClient(app, raise_server_exceptions=False) response = client.get("/server-error")Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Dec 03 22:37:12 GMT 2024 - 2.4K bytes - Click Count (0) -
tests/test_tutorial/test_settings/test_app01.py
monkeypatch.delenv("ADMIN_EMAIL", raising=False) if mod_name in sys.modules: del sys.modules[mod_name] # pragma: no cover with pytest.raises(ValidationError) as exc_info: importlib.import_module(mod_name) assert exc_info.value.errors() == [ { "loc": ("admin_email",), "msg": "Field required",
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 2.2K bytes - Click Count (0) -
tests/test_tutorial/test_response_model/test_tutorial003_04.py
"module_name", [ pytest.param("tutorial003_04_py39"), pytest.param("tutorial003_04_py310", marks=needs_py310), ], ) def test_invalid_response_model(module_name: str) -> None: with pytest.raises(FastAPIError):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 453 bytes - Click Count (0) -
tests/test_jsonable_encoder.py
name: str data = ModelV1(name="test") with pytest.raises(PydanticV1NotSupportedError): jsonable_encoder(data) def test_encode_model_with_config(): model = ModelWithConfig(role=RoleEnum.admin) assert jsonable_encoder(model) == {"role": "admin"} def test_encode_model_with_alias_raises(): with pytest.raises(ValidationError): ModelWithAlias(foo="Bar")Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 9.2K bytes - Click Count (0) -
tests/test_empty_router.py
assert response.status_code == 200, response.text assert response.json() == ["OK"] def test_include_empty(): # if both include and router.path are empty - it should raise exception with pytest.raises(FastAPIError):Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sun Jun 11 22:37:34 GMT 2023 - 805 bytes - Click Count (1) -
tests/test_fastapi_cli.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Dec 02 04:02:38 GMT 2025 - 866 bytes - Click Count (0) -
tests/test_tutorial/test_dependencies/test_tutorial008d.py
assert response.status_code == 200, response.text assert response.json() == "plumbus" def test_internal_error(mod: ModuleType): client = TestClient(mod.app) with pytest.raises(mod.InternalError) as exc_info: client.get("/items/portal-gun") assert ( exc_info.value.args[0] == "The portal gun is too dangerous to be owned by Rick" )Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.4K bytes - Click Count (0) -
tests/test_additional_responses_bad.py
}, "summary": "A", "operationId": "a_a_get", } } }, } client = TestClient(app) def test_openapi_schema(): with pytest.raises(ValueError):Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 1.1K bytes - Click Count (0)