- Sort Score
- Result 10 results
- Languages All
Results 301 - 310 of 550 for tutorial008c_py39 (0.35 sec)
-
tests/test_tutorial/test_response_cookies/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.response_cookies.tutorial001_py39 import app client = TestClient(app) def test_path_operation(): response = client.post("/cookie/") assert response.status_code == 200, response.text assert response.json() == {"message": "Come to the dark side, we have cookies"}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 408 bytes - Viewed (0) -
docs/es/docs/advanced/websockets.md
{* ../../docs_src/websockets/tutorial001_py39.py hl[2,6:38,41:43] *} ## Crear un `websocket` { #create-a-websocket } En tu aplicación de **FastAPI**, crea un `websocket`: {* ../../docs_src/websockets/tutorial001_py39.py hl[1,46:47] *} /// note | Detalles Técnicos También podrías usar `from starlette.websockets import WebSocket`.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 5.9K bytes - Viewed (0) -
tests/test_tutorial/test_response_cookies/test_tutorial002.py
from fastapi.testclient import TestClient from docs_src.response_cookies.tutorial002_py39 import app client = TestClient(app) def test_path_operation(): response = client.post("/cookie-and-object/") assert response.status_code == 200, response.text assert response.json() == {"message": "Come to the dark side, we have cookies"}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 419 bytes - Viewed (0) -
tests/test_tutorial/test_testing/test_tutorial001.py
from docs_src.app_testing.tutorial001_py39 import client, test_read_main def test_main(): test_read_main() def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/": { "get": {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 826 bytes - Viewed (0) -
tests/test_tutorial/test_wsgi/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.wsgi.tutorial001_py39 import app client = TestClient(app) def test_flask(): response = client.get("/v1/") assert response.status_code == 200, response.text assert response.text == "Hello, World from Flask!" def test_app(): response = client.get("/v2") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 441 bytes - Viewed (1) -
docs/ru/docs/advanced/websockets.md
{* ../../docs_src/websockets/tutorial001_py39.py hl[2,6:38,41:43] *} ## Создание `websocket` { #create-a-websocket } Создайте `websocket` в своем **FastAPI** приложении: {* ../../docs_src/websockets/tutorial001_py39.py hl[1,46:47] *} /// note | Технические детали Вы также можете использовать `from starlette.websockets import WebSocket`.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 8.6K bytes - Viewed (0) -
docs/ru/docs/tutorial/first-steps.md
{* ../../docs_src/first_steps/tutorial001_py39.py hl[7] *} Это функция на Python. **FastAPI** будет вызывать её каждый раз, когда получает запрос к URL «`/`» с операцией `GET`. В данном случае это асинхронная (`async`) функция. --- Вы также можете определить её как обычную функцию вместо `async def`: {* ../../docs_src/first_steps/tutorial003_py39.py hl[7] *} /// note | ПримечаниеRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 17.7K bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial001b.py
from fastapi.testclient import TestClient from docs_src.custom_response.tutorial001b_py39 import app client = TestClient(app) def test_get_custom_response(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [{"item_id": "Foo"}] def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008.py
from unittest.mock import Mock, patch import pytest from fastapi import Depends, FastAPI from fastapi.testclient import TestClient @pytest.fixture( name="module", params=[ "tutorial008_py39", # Fails with `NameError: name 'DepA' is not defined` pytest.param("tutorial008_an_py39", marks=pytest.mark.xfail), ], ) def get_module(request: pytest.FixtureRequest):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 1.4K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008b.py
import importlib import pytest from fastapi.testclient import TestClient @pytest.fixture( name="client", params=[ pytest.param("tutorial008b_py39"), pytest.param("tutorial008b_an_py39"), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.dependencies.{request.param}") client = TestClient(mod.app) return client
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1K bytes - Viewed (0)