- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for delenv (0.04 sec)
-
tests/test_tutorial/test_settings/test_app01.py
if mod_name in sys.modules: del sys.modules[mod_name] monkeypatch.setenv("ADMIN_EMAIL", "******@****.***") main_mod = importlib.import_module(mod_name) return TestClient(main_mod.app) def test_settings_validation_error(mod_name: str, monkeypatch: MonkeyPatch): monkeypatch.delenv("ADMIN_EMAIL", raising=False) if mod_name in sys.modules:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 2.2K bytes - Viewed (0) -
docs/de/docs/tutorial/body.md
Um einen **Request**body zu deklarieren, verwenden Sie <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">Pydantic</a>-Modelle mit all deren Fähigkeiten und Vorzügen. /// info | Info Um Daten zu senden, sollten Sie eines von: `POST` (meistverwendet), `PUT`, `DELETE` oder `PATCH` verwenden.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 24 10:28:19 UTC 2025 - 7.9K bytes - Viewed (0) -
docs/de/docs/advanced/settings.md
/// tip | Tipp Damit das funktioniert, müssen Sie `pip install python-dotenv` ausführen. /// ### Die `.env`-Datei { #the-env-file } Sie könnten eine `.env`-Datei haben, mit: ```bashRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 24 10:28:19 UTC 2025 - 13.1K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_configurations/test_tutorial003_tutorial004.py
import importlib from textwrap import dedent import pytest from dirty_equals import IsList from fastapi.testclient import TestClient from ...utils import needs_py310 DESCRIPTIONS = { "tutorial003": "Create an item with all the information, name, description, price, tax and a set of unique tags", "tutorial004": dedent(""" Create an item with all the information: - **name**: each item must have a nameRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 7K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_tutorial001.py
] ) # Delete a hero response = client.delete(f"/heroes/{hero_id}") assert response.status_code == 200, response.text assert response.json() == snapshot({"ok": True}) response = client.get(f"/heroes/{hero_id}") assert response.status_code == 404, response.text response = client.delete(f"/heroes/{hero_id}")Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 14K bytes - Viewed (0) -
tests/test_tutorial/test_settings/test_app03.py
monkeypatch.setenv("ADMIN_EMAIL", "******@****.***") settings = main_mod.get_settings() assert settings.app_name == "Awesome API" assert settings.admin_email == "******@****.***" assert settings.items_per_user == 50 def test_endpoint(main_mod: ModuleType, monkeypatch: MonkeyPatch): monkeypatch.setenv("ADMIN_EMAIL", "******@****.***")Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_settings/test_tutorial001.py
from pytest import MonkeyPatch @pytest.fixture(name="app", params=[pytest.param("tutorial001_py39")]) def get_app(request: pytest.FixtureRequest, monkeypatch: MonkeyPatch): monkeypatch.setenv("ADMIN_EMAIL", "******@****.***") mod = importlib.import_module(f"docs_src.settings.{request.param}") return mod.app def test_settings(app): client = TestClient(app) response = client.get("/info")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 690 bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_tutorial002.py
) # Delete a hero response = client.delete(f"/heroes/{hero_id}") assert response.status_code == 200, response.text assert response.json() == snapshot({"ok": True}) # The hero is no longer found response = client.get(f"/heroes/{hero_id}") assert response.status_code == 404, response.text # Delete a hero that does not existRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 17.9K bytes - Viewed (0) -
tests/test_extra_routes.py
return {"item_id": item_id} def get_not_decorated(item_id: str): return {"item_id": item_id} app.add_api_route("/items-not-decorated/{item_id}", get_not_decorated) @app.delete("/items/{item_id}") def delete_item(item_id: str, item: Item): return {"item_id": item_id, "item": item} @app.head("/items/{item_id}") def head_item(item_id: str):Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 13.5K bytes - Viewed (0) -
docs/pt/docs/advanced/dataclasses.md
Confira as dicas de anotação no código acima para ver mais detalhes específicos. ## Saiba Mais { #learn-more } Você também pode combinar `dataclasses` com outros modelos Pydantic, herdar deles, incluí-los em seus próprios modelos, etc. Para saber mais, confira a <a href="https://docs.pydantic.dev/latest/concepts/dataclasses/" class="external-link" target="_blank">documentação do Pydantic sobre dataclasses</a>.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 4.5K bytes - Viewed (0)