- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 23 for Mock (0.21 sec)
-
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 (7) -
docs/en/docs/advanced/testing-dependencies.md
This provider might be charging you per request, and calling it might take some extra time than if you had a fixed mock user for tests. You probably want to test the external provider once, but not necessarily call it for every test that runs. In this case, you can override the dependency that calls that provider, and use a custom dependency that returns a mock user, only for your tests. ### Use the `app.dependency_overrides` attribute
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 2.9K bytes - Viewed (0) -
.gitignore
.idea .ipynb_checkpoints .mypy_cache .vscode __pycache__ .pytest_cache htmlcov dist site .coverage coverage.xml .netlify test.db log.txt Pipfile.lock env3.* env docs_build site_build venv docs.zip archive.zip # vim temporary files *~ .*.sw? .cache # macOS
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Aug 19 13:11:35 GMT 2023 - 268 bytes - Viewed (0) -
docs/de/docs/tutorial/body-nested-models.md
``` Das würde bedeuten, dass **FastAPI** einen Body erwartet wie: ```JSON { "name": "Foo", "description": "The pretender", "price": 42.0, "tax": 3.2, "tags": ["rock", "metal", "bar"], "image": { "url": "http://example.com/baz.jpg", "name": "The Foo live" } } ``` Wiederum, nur mit dieser Deklaration erhalten Sie von **FastAPI**:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 10.4K bytes - Viewed (0) -
docs/ru/docs/deployment/docker.md
В ней будет создан файл `requirements.txt` 3. На этом шаге установите Poetry. 4. Скопируйте файлы `pyproject.toml` и `poetry.lock` в директорию `/tmp`. Поскольку название файла написано как `./poetry.lock*` (с `*` в конце), то ничего не сломается, если такой файл не будет найден. 5. Создайте файл `requirements.txt`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 57.5K bytes - Viewed (0) -
docs/ru/docs/tutorial/body-nested-models.md
Это означает, что **FastAPI** будет ожидать тело запроса, аналогичное этому: ```JSON { "name": "Foo", "description": "The pretender", "price": 42.0, "tax": 3.2, "tags": ["rock", "metal", "bar"], "image": { "url": "http://example.com/baz.jpg", "name": "The Foo live" } } ``` Ещё раз: сделав такое объявление, с помощью **FastAPI** вы получите:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 14.9K bytes - Viewed (0) -
docs/en/docs/tutorial/security/first-steps.md
You will see something like this: <img src="/img/tutorial/security/image01.png"> !!! check "Authorize button!" You already have a shiny new "Authorize" button. And your *path operation* has a little lock in the top-right corner that you can click. And if you click it, you have a little authorization form to type a `username` and `password` (and other optional fields): <img src="/img/tutorial/security/image02.png">
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:02:19 GMT 2024 - 8.9K bytes - Viewed (0) -
docs/ko/docs/deployment/docker.md
2. `/tmp`를 현재의 워킹 디렉터리로 설정합니다. 이 위치에 우리는 `requirements.txt` 파일을 생성할 것입니다. 3. 이 도커 스테이지에서 Poetry를 설치합니다. 4. 파일 `pyproject.toml`와 `poetry.lock`를 `/tmp` 디렉터리로 복사합니다. `./poetry.lock*` (`*`로 끝나는) 파일을 사용하기 때문에, 파일이 아직 사용가능하지 않더라도 고장나지 않을 것입니다. 5. `requirements.txt` 파일을 생성합니다. 6. 이것이 마지막 스테이지로, 여기에 위치한 모든 것이 마지막 컨테이너 이미지에 포함될 것입니다. 7. 현재의 워킹 디렉터리를 `/code`로 설정합니다.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 42.6K bytes - Viewed (0) -
docs/en/docs/release-notes.md
## 0.30.1 * Add section in docs about [External Links and Articles](https://fastapi.tiangolo.com/external-links/). PR [#341](https://github.com/tiangolo/fastapi/pull/341). * Remove `Pipfile.lock` from the repository as it is only used by FastAPI contributors (developers of FastAPI itself). See the PR for more details. PR [#340](https://github.com/tiangolo/fastapi/pull/340).
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri May 03 23:25:42 GMT 2024 - 388.1K bytes - Viewed (1)