- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 64 for Kersting (0.15 sec)
-
docs/zh/docs/advanced/testing-database.md
# 测试数据库 您还可以使用[测试依赖项](testing-dependencies.md){.internal-link target=_blank}中的覆盖依赖项方法变更测试的数据库。 实现设置其它测试数据库、在测试后回滚数据、或预填测试数据等操作。 本章的主要思路与上一章完全相同。 ## 为 SQL 应用添加测试 为了使用测试数据库,我们要升级 [SQL 关系型数据库](../tutorial/sql-databases.md){.internal-link target=_blank} 一章中的示例。 应用的所有代码都一样,直接查看那一章的示例代码即可。 本章只是新添加了测试文件。 正常的依赖项 `get_db()` 返回数据库会话。 测试时使用覆盖依赖项返回自定义数据库会话代替正常的依赖项。 本例中,要创建仅用于测试的临时数据库。 ## 文件架构
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Jan 28 18:09:26 GMT 2024 - 2.8K bytes - Viewed (0) -
docs/en/docs/reference/testclient.md
You can use the `TestClient` class to test FastAPI applications without creating an actual HTTP and socket connection, just communicating directly with the FastAPI code. Read more about it in the [FastAPI docs for Testing](https://fastapi.tiangolo.com/tutorial/testing/). You can import it directly from `fastapi.testclient`: ```python from fastapi.testclient import TestClient ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 450 bytes - Viewed (0) -
docs_src/settings/app02/test_main.py
client = TestClient(app) def get_settings_override(): return Settings(admin_email="testing******@****.***") app.dependency_overrides[get_settings] = get_settings_override def test_app(): response = client.get("/info") data = response.json() assert data == { "app_name": "Awesome API", "admin_email": "testing******@****.***", "items_per_user": 50,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jul 29 09:26:07 GMT 2021 - 515 bytes - Viewed (0) -
docs_src/settings/app02_an_py39/test_main.py
client = TestClient(app) def get_settings_override(): return Settings(admin_email="testing******@****.***") app.dependency_overrides[get_settings] = get_settings_override def test_app(): response = client.get("/info") data = response.json() assert data == { "app_name": "Awesome API", "admin_email": "testing******@****.***", "items_per_user": 50,
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 515 bytes - Viewed (0) -
docs/en/docs/advanced/async-tests.md
## Example For a simple example, let's consider a file structure similar to the one described in [Bigger Applications](../tutorial/bigger-applications.md){.internal-link target=_blank} and [Testing](../tutorial/testing.md){.internal-link target=_blank}: ``` . ├── app │ ├── __init__.py │ ├── main.py │ └── test_main.py ``` The file `main.py` would have: ```Python
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Jan 13 12:07:15 GMT 2024 - 3.9K bytes - Viewed (0) -
tests/test_tutorial/test_testing/test_main_b.py
from docs_src.app_testing.app_b import test_main def test_app(): test_main.test_create_existing_item() test_main.test_create_item() test_main.test_create_item_bad_token() test_main.test_read_nonexistent_item() test_main.test_read_item()
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 300 bytes - Viewed (0) -
tests/test_tutorial/test_testing/test_main_b_an_py39.py
from ...utils import needs_py39 @needs_py39 def test_app(): from docs_src.app_testing.app_b_an_py39 import test_main test_main.test_create_existing_item() test_main.test_create_item() test_main.test_create_item_bad_token() test_main.test_read_nonexistent_item() test_main.test_read_item()
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 357 bytes - Viewed (0) -
docs/es/docs/deployment/versions.md
## Actualizando las versiones de FastAPI Para esto es recomendable primero añadir tests a tu aplicación. Con **FastAPI** es muy fácil (gracias a Starlette), revisa la documentación [Testing](../tutorial/testing.md){.internal-link target=_blank} Luego de tener los tests, puedes actualizar la versión de **FastAPI** a una más reciente y asegurarte de que tu código funciona correctamente ejecutando los tests.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Feb 07 11:55:38 GMT 2024 - 4.2K bytes - Viewed (0) -
docs/ru/docs/deployment/versions.md
## Обновление версий FastAPI Вам следует добавить тесты для вашего приложения. С помощью **FastAPI** это очень просто (благодаря Starlette), см. документацию: [Тестирование](../tutorial/testing.md){.internal-link target=_blank} После создания тестов вы можете обновить свою версию **FastAPI** до более новой. После этого следует убедиться, что ваш код работает корректно, запустив тесты.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 5.7K bytes - Viewed (0) -
docs/zh/docs/deployment/versions.md
fastapi>=0.45.0,<0.46.0 ``` "MINOR"版本中会添加breaking changes和新功能。 !!! tip "MINOR"是中间的数字,例如,在`0.2.3`中,MINOR版本是`2`。 ## 升级FastAPI版本 你应该为你的应用程序添加测试。 使用 **FastAPI** 编写测试非常简单(感谢 Starlette),请参考文档:[测试](../tutorial/testing.md){.internal-link target=_blank} 添加测试后,你可以将 **FastAPI** 版本升级到更新版本,并通过运行测试来确保所有代码都能正常工作。 如果一切正常,或者在进行必要的更改之后,并且所有测试都通过了,那么你可以将`fastapi`固定到新的版本。 ## 关于Starlette 你不应该固定`starlette`的版本。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Sep 22 23:30:46 GMT 2023 - 3.1K bytes - Viewed (0)