- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 26 for py_test (0.15 sec)
-
tests/test_tutorial/test_body_updates/test_tutorial001_py39.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py39, needs_pydanticv1, needs_pydanticv2 @pytest.fixture(name="client") def get_client(): from docs_src.body_updates.tutorial001_py39 import app client = TestClient(app) return client @needs_py39 def test_get(client: TestClient): response = client.get("/items/baz") assert response.status_code == 200, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Sep 28 04:14:40 GMT 2023 - 11.8K bytes - Viewed (0) -
tests/test_tutorial/test_body/test_tutorial001_py310.py
from unittest.mock import patch import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture def client(): from docs_src.body.tutorial001_py310 import app client = TestClient(app) return client @needs_py310 def test_body_float(client: TestClient): response = client.post("/items/", json={"name": "Foo", "price": 50.5})
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 15K bytes - Viewed (2) -
tests/test_tutorial/test_body/test_tutorial001.py
from unittest.mock import patch import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient @pytest.fixture def client(): from docs_src.body.tutorial001 import app client = TestClient(app) return client def test_body_float(client: TestClient): response = client.post("/items/", json={"name": "Foo", "price": 50.5}) assert response.status_code == 200
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 14.7K bytes - Viewed (9) -
tests/test_tutorial/test_bigger_applications/test_main_an.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient @pytest.fixture(name="client") def get_client(): from docs_src.bigger_applications.app_an.main import app client = TestClient(app) return client def test_users_token_jessica(client: TestClient): response = client.get("/users?token=jessica") assert response.status_code == 200
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 24.6K bytes - Viewed (0) -
tests/test_tutorial/test_bigger_applications/test_main_an_py39.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.bigger_applications.app_an_py39.main import app client = TestClient(app) return client @needs_py39 def test_users_token_jessica(client: TestClient): response = client.get("/users?token=jessica")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 24.9K bytes - Viewed (0) -
tests/test_schema_extra_examples.py
): return item_id with pytest.warns(DeprecationWarning): @app.get("/path_example_examples/{item_id}") def path_example_examples( item_id: str = Path( example="item_overridden", examples=["item_1", "item_2"], ), ): return item_id with pytest.warns(DeprecationWarning):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 24 20:26:06 GMT 2023 - 37.7K bytes - Viewed (0) -
tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an.py
import pytest from dirty_equals import IsDict from fastapi import FastAPI from fastapi.testclient import TestClient @pytest.fixture(name="app") def get_app(): from docs_src.request_forms_and_files.tutorial001_an import app return app @pytest.fixture(name="client") def get_client(app: FastAPI): client = TestClient(app) return client def test_post_form_no_body(client: TestClient):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 9.8K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases.py
import importlib import os from pathlib import Path import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_pydanticv1 @pytest.fixture(scope="module") def client(tmp_path_factory: pytest.TempPathFactory): tmp_path = tmp_path_factory.mktemp("data") cwd = os.getcwd() os.chdir(tmp_path) test_db = Path("./sql_app.db")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.1K bytes - Viewed (0) -
tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py310.py
import importlib import os from pathlib import Path import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py310, needs_pydanticv1 @pytest.fixture(scope="module") def client(tmp_path_factory: pytest.TempPathFactory): tmp_path = tmp_path_factory.mktemp("data") cwd = os.getcwd() os.chdir(tmp_path) test_db = Path("./sql_app.db")
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.5K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_py39.py
import pytest from dirty_equals import IsDict, IsOneOf from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.security.tutorial005_py39 import app client = TestClient(app) return client def get_access_token( *, username="johndoe", password="secret", scope=None, client: TestClient ):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 16.3K bytes - Viewed (0)