diff --git a/docs/en/docs/advanced/nosql-databases.md b/docs/en/docs/advanced/nosql-databases.md index 3cbc2aa20..9d8c95086 100644 --- a/docs/en/docs/advanced/nosql-databases.md +++ b/docs/en/docs/advanced/nosql-databases.md @@ -19,7 +19,7 @@ You can adapt it to any other NoSQL database like: For now, don't pay attention to the rest, only the imports: -```Python hl_lines="6 7 8" +```Python hl_lines="3 4 5" {!../../../docs_src/nosql_databases/tutorial001.py!} ``` @@ -29,7 +29,7 @@ We will use it later as a fixed field `type` in our documents. This is not required by Couchbase, but is a good practice that will help you afterwards. -```Python hl_lines="10" +```Python hl_lines="9" {!../../../docs_src/nosql_databases/tutorial001.py!} ``` @@ -54,7 +54,7 @@ This utility function will: * Set defaults for timeouts. * Return it. -```Python hl_lines="13 14 15 16 17 18 19 20 21 22" +```Python hl_lines="12 13 14 15 16 17 18 19 20 21" {!../../../docs_src/nosql_databases/tutorial001.py!} ``` @@ -66,7 +66,7 @@ As **Couchbase** "documents" are actually just "JSON objects", we can model them First, let's create a `User` model: -```Python hl_lines="25 26 27 28 29" +```Python hl_lines="24 25 26 27 28" {!../../../docs_src/nosql_databases/tutorial001.py!} ``` @@ -80,7 +80,7 @@ This will have the data that is actually stored in the database. We don't create it as a subclass of Pydantic's `BaseModel` but as a subclass of our own `User`, because it will have all the attributes in `User` plus a couple more: -```Python hl_lines="32 33 34" +```Python hl_lines="31 32 33" {!../../../docs_src/nosql_databases/tutorial001.py!} ``` @@ -100,7 +100,7 @@ Now create a function that will: By creating a function that is only dedicated to getting your user from a `username` (or any other parameter) independent of your *path operation function*, you can more easily re-use it in multiple parts and also add unit tests for it: -```Python hl_lines="37 38 39 40 41 42 43" +```Python hl_lines="36 37 38 39 40 41 42" {!../../../docs_src/nosql_databases/tutorial001.py!} ``` @@ -135,7 +135,7 @@ UserInDB(username="johndoe", hashed_password="some_hash") ### Create the `FastAPI` app -```Python hl_lines="47" +```Python hl_lines="46" {!../../../docs_src/nosql_databases/tutorial001.py!} ``` @@ -145,7 +145,7 @@ As our code is calling Couchbase and we are not using the threads", so, we can get just get the bucket directly and pass it to our utility functions: -```Python hl_lines="50 51 52 53 54" +```Python hl_lines="49 50 51 52 53" {!../../../docs_src/nosql_databases/tutorial001.py!} ``` diff --git a/docs_src/nosql_databases/tutorial001.py b/docs_src/nosql_databases/tutorial001.py index 3a1d3fb52..39548d862 100644 --- a/docs_src/nosql_databases/tutorial001.py +++ b/docs_src/nosql_databases/tutorial001.py @@ -1,11 +1,10 @@ from typing import Optional -from fastapi import FastAPI -from pydantic import BaseModel - from couchbase import LOCKMODE_WAIT from couchbase.bucket import Bucket from couchbase.cluster import Cluster, PasswordAuthenticator +from fastapi import FastAPI +from pydantic import BaseModel USERPROFILE_DOC_TYPE = "userprofile" diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py index 003fa7f4a..7fb7347c5 100644 --- a/fastapi/dependencies/utils.py +++ b/fastapi/dependencies/utils.py @@ -60,9 +60,9 @@ try: from pydantic.typing import ForwardRef, evaluate_forwardref except ImportError: # pragma: nocover # TODO: remove when removing support for Pydantic < 1.0.0 + from pydantic import Schema as FieldInfo # type: ignore from pydantic.fields import Field as ModelField # type: ignore from pydantic.fields import Required, Shape # type: ignore - from pydantic import Schema as FieldInfo # type: ignore from pydantic.schema import get_annotation_from_schema # type: ignore from pydantic.utils import ForwardRef, evaluate_forwardref # type: ignore diff --git a/fastapi/security/http.py b/fastapi/security/http.py index 9625951ae..3f2c1c390 100644 --- a/fastapi/security/http.py +++ b/fastapi/security/http.py @@ -3,10 +3,8 @@ from base64 import b64decode from typing import Optional from fastapi.exceptions import HTTPException -from fastapi.openapi.models import ( - HTTPBase as HTTPBaseModel, - HTTPBearer as HTTPBearerModel, -) +from fastapi.openapi.models import HTTPBase as HTTPBaseModel +from fastapi.openapi.models import HTTPBearer as HTTPBearerModel from fastapi.security.base import SecurityBase from fastapi.security.utils import get_authorization_scheme_param from pydantic import BaseModel diff --git a/fastapi/security/oauth2.py b/fastapi/security/oauth2.py index c9edbae42..141a9b5a9 100644 --- a/fastapi/security/oauth2.py +++ b/fastapi/security/oauth2.py @@ -1,7 +1,8 @@ from typing import List, Optional from fastapi.exceptions import HTTPException -from fastapi.openapi.models import OAuth2 as OAuth2Model, OAuthFlows as OAuthFlowsModel +from fastapi.openapi.models import OAuth2 as OAuth2Model +from fastapi.openapi.models import OAuthFlows as OAuthFlowsModel from fastapi.param_functions import Form from fastapi.security.base import SecurityBase from fastapi.security.utils import get_authorization_scheme_param diff --git a/fastapi/utils.py b/fastapi/utils.py index 2f2cee3a1..c388047cd 100644 --- a/fastapi/utils.py +++ b/fastapi/utils.py @@ -18,8 +18,8 @@ try: PYDANTIC_1 = True except ImportError: # pragma: nocover # TODO: remove when removing support for Pydantic < 1.0.0 - from pydantic.fields import Field as ModelField # type: ignore from pydantic import Schema as FieldInfo # type: ignore + from pydantic.fields import Field as ModelField # type: ignore class UndefinedType: # type: ignore def __repr__(self) -> str: diff --git a/pyproject.toml b/pyproject.toml index a6f0030a2..bf045fbbf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,3 +91,7 @@ all = [ "async_exit_stack", "async_generator" ] + +[tool.isort] +profile = "black" +known_third_party = ["fastapi", "pydantic", "starlette"] diff --git a/scripts/format-imports.sh b/scripts/format-imports.sh index d2c0b7a58..1fe193b97 100755 --- a/scripts/format-imports.sh +++ b/scripts/format-imports.sh @@ -2,5 +2,5 @@ set -x # Sort imports one per line, so autoflake can remove unused imports -isort --recursive --force-single-line-imports --thirdparty fastapi --apply fastapi tests docs_src scripts +isort fastapi tests docs_src scripts --force-single-line-imports sh ./scripts/format.sh diff --git a/scripts/format.sh b/scripts/format.sh index 07ce78f69..ee4fbf1a5 100755 --- a/scripts/format.sh +++ b/scripts/format.sh @@ -3,4 +3,4 @@ set -x autoflake --remove-all-unused-imports --recursive --remove-unused-variables --in-place docs_src fastapi tests scripts --exclude=__init__.py black fastapi tests docs_src scripts -isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --combine-as --line-width 88 --recursive --thirdparty fastapi --thirdparty pydantic --thirdparty starlette --apply fastapi tests docs_src scripts +isort fastapi tests docs_src scripts diff --git a/scripts/lint.sh b/scripts/lint.sh index ec0f7f41b..43a1b0c1d 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -5,4 +5,4 @@ set -x mypy fastapi black fastapi tests --check -isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --combine-as --line-width 88 --recursive --check-only --thirdparty fastapi --thirdparty fastapi --thirdparty pydantic --thirdparty starlette fastapi tests +isort fastapi tests docs_src scripts --check-only diff --git a/tests/test_tutorial/test_additional_responses/test_tutorial001.py b/tests/test_tutorial/test_additional_responses/test_tutorial001.py index 82dec78ad..8342dd787 100644 --- a/tests/test_tutorial/test_additional_responses/test_tutorial001.py +++ b/tests/test_tutorial/test_additional_responses/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from additional_responses.tutorial001 import app +from docs_src.additional_responses.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_additional_responses/test_tutorial002.py b/tests/test_tutorial/test_additional_responses/test_tutorial002.py index 83c77cef5..57f877978 100644 --- a/tests/test_tutorial/test_additional_responses/test_tutorial002.py +++ b/tests/test_tutorial/test_additional_responses/test_tutorial002.py @@ -3,7 +3,7 @@ import shutil from fastapi.testclient import TestClient -from additional_responses.tutorial002 import app +from docs_src.additional_responses.tutorial002 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_additional_responses/test_tutorial003.py b/tests/test_tutorial/test_additional_responses/test_tutorial003.py index a1b0a7fb5..37190b36a 100644 --- a/tests/test_tutorial/test_additional_responses/test_tutorial003.py +++ b/tests/test_tutorial/test_additional_responses/test_tutorial003.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from additional_responses.tutorial003 import app +from docs_src.additional_responses.tutorial003 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_additional_responses/test_tutorial004.py b/tests/test_tutorial/test_additional_responses/test_tutorial004.py index d7456630e..c44a18f68 100644 --- a/tests/test_tutorial/test_additional_responses/test_tutorial004.py +++ b/tests/test_tutorial/test_additional_responses/test_tutorial004.py @@ -3,7 +3,7 @@ import shutil from fastapi.testclient import TestClient -from additional_responses.tutorial004 import app +from docs_src.additional_responses.tutorial004 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_additional_status_codes/test_tutorial001.py b/tests/test_tutorial/test_additional_status_codes/test_tutorial001.py index e2131c71b..c382cb5fe 100644 --- a/tests/test_tutorial/test_additional_status_codes/test_tutorial001.py +++ b/tests/test_tutorial/test_additional_status_codes/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from additional_status_codes.tutorial001 import app +from docs_src.additional_status_codes.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_advanced_middleware/test_tutorial001.py b/tests/test_tutorial/test_advanced_middleware/test_tutorial001.py index fb5058bcd..17165c0fc 100644 --- a/tests/test_tutorial/test_advanced_middleware/test_tutorial001.py +++ b/tests/test_tutorial/test_advanced_middleware/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from advanced_middleware.tutorial001 import app +from docs_src.advanced_middleware.tutorial001 import app def test_middleware(): diff --git a/tests/test_tutorial/test_advanced_middleware/test_tutorial002.py b/tests/test_tutorial/test_advanced_middleware/test_tutorial002.py index bac2dea8b..79be52f4d 100644 --- a/tests/test_tutorial/test_advanced_middleware/test_tutorial002.py +++ b/tests/test_tutorial/test_advanced_middleware/test_tutorial002.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from advanced_middleware.tutorial002 import app +from docs_src.advanced_middleware.tutorial002 import app def test_middleware(): diff --git a/tests/test_tutorial/test_advanced_middleware/test_tutorial003.py b/tests/test_tutorial/test_advanced_middleware/test_tutorial003.py index 230a5742d..04a922ff7 100644 --- a/tests/test_tutorial/test_advanced_middleware/test_tutorial003.py +++ b/tests/test_tutorial/test_advanced_middleware/test_tutorial003.py @@ -1,7 +1,7 @@ from fastapi.responses import PlainTextResponse from fastapi.testclient import TestClient -from advanced_middleware.tutorial003 import app +from docs_src.advanced_middleware.tutorial003 import app @app.get("/large") diff --git a/tests/test_tutorial/test_async_sql_databases/test_tutorial001.py b/tests/test_tutorial/test_async_sql_databases/test_tutorial001.py index 17214f874..15836841d 100644 --- a/tests/test_tutorial/test_async_sql_databases/test_tutorial001.py +++ b/tests/test_tutorial/test_async_sql_databases/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from async_sql_databases.tutorial001 import app +from docs_src.async_sql_databases.tutorial001 import app openapi_schema = { "openapi": "3.0.2", diff --git a/tests/test_tutorial/test_background_tasks/test_tutorial001.py b/tests/test_tutorial/test_background_tasks/test_tutorial001.py index 8c8628982..0602cd8aa 100644 --- a/tests/test_tutorial/test_background_tasks/test_tutorial001.py +++ b/tests/test_tutorial/test_background_tasks/test_tutorial001.py @@ -3,7 +3,7 @@ from pathlib import Path from fastapi.testclient import TestClient -from background_tasks.tutorial001 import app +from docs_src.background_tasks.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_background_tasks/test_tutorial002.py b/tests/test_tutorial/test_background_tasks/test_tutorial002.py index d3ad37271..74de1314b 100644 --- a/tests/test_tutorial/test_background_tasks/test_tutorial002.py +++ b/tests/test_tutorial/test_background_tasks/test_tutorial002.py @@ -3,7 +3,7 @@ from pathlib import Path from fastapi.testclient import TestClient -from background_tasks.tutorial002 import app +from docs_src.background_tasks.tutorial002 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_behind_a_proxy/test_tutorial001.py b/tests/test_tutorial/test_behind_a_proxy/test_tutorial001.py index 8b3b526ed..a6b7401cf 100644 --- a/tests/test_tutorial/test_behind_a_proxy/test_tutorial001.py +++ b/tests/test_tutorial/test_behind_a_proxy/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from behind_a_proxy.tutorial001 import app +from docs_src.behind_a_proxy.tutorial001 import app client = TestClient(app, root_path="/api/v1") diff --git a/tests/test_tutorial/test_behind_a_proxy/test_tutorial002.py b/tests/test_tutorial/test_behind_a_proxy/test_tutorial002.py index 0a889c469..26da7dea4 100644 --- a/tests/test_tutorial/test_behind_a_proxy/test_tutorial002.py +++ b/tests/test_tutorial/test_behind_a_proxy/test_tutorial002.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from behind_a_proxy.tutorial002 import app +from docs_src.behind_a_proxy.tutorial002 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_bigger_applications/test_main.py b/tests/test_tutorial/test_bigger_applications/test_main.py index 1a90ba05b..5a5ad1b84 100644 --- a/tests/test_tutorial/test_bigger_applications/test_main.py +++ b/tests/test_tutorial/test_bigger_applications/test_main.py @@ -1,7 +1,7 @@ import pytest from fastapi.testclient import TestClient -from bigger_applications.app.main import app +from docs_src.bigger_applications.app.main import app client = TestClient(app) diff --git a/tests/test_tutorial/test_body/test_tutorial001.py b/tests/test_tutorial/test_body/test_tutorial001.py index df28a5d35..65629df4b 100644 --- a/tests/test_tutorial/test_body/test_tutorial001.py +++ b/tests/test_tutorial/test_body/test_tutorial001.py @@ -3,7 +3,7 @@ from unittest.mock import patch import pytest from fastapi.testclient import TestClient -from body.tutorial001 import app +from docs_src.body.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_body_fields/test_tutorial001.py b/tests/test_tutorial/test_body_fields/test_tutorial001.py index b5e95a3cf..458bd70d5 100644 --- a/tests/test_tutorial/test_body_fields/test_tutorial001.py +++ b/tests/test_tutorial/test_body_fields/test_tutorial001.py @@ -1,7 +1,7 @@ import pytest from fastapi.testclient import TestClient -from body_fields.tutorial001 import app +from docs_src.body_fields.tutorial001 import app # TODO: remove when removing support for Pydantic < 1.0.0 try: diff --git a/tests/test_tutorial/test_body_multiple_params/test_tutorial001.py b/tests/test_tutorial/test_body_multiple_params/test_tutorial001.py index 19972668d..b11ecddab 100644 --- a/tests/test_tutorial/test_body_multiple_params/test_tutorial001.py +++ b/tests/test_tutorial/test_body_multiple_params/test_tutorial001.py @@ -1,7 +1,7 @@ import pytest from fastapi.testclient import TestClient -from body_multiple_params.tutorial001 import app +from docs_src.body_multiple_params.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_body_multiple_params/test_tutorial003.py b/tests/test_tutorial/test_body_multiple_params/test_tutorial003.py index d228f9f67..d98e3e419 100644 --- a/tests/test_tutorial/test_body_multiple_params/test_tutorial003.py +++ b/tests/test_tutorial/test_body_multiple_params/test_tutorial003.py @@ -1,7 +1,7 @@ import pytest from fastapi.testclient import TestClient -from body_multiple_params.tutorial003 import app +from docs_src.body_multiple_params.tutorial003 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_body_nested_models/test_tutorial009.py b/tests/test_tutorial/test_body_nested_models/test_tutorial009.py index 55859eb2b..8eb0ad130 100644 --- a/tests/test_tutorial/test_body_nested_models/test_tutorial009.py +++ b/tests/test_tutorial/test_body_nested_models/test_tutorial009.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from body_nested_models.tutorial009 import app +from docs_src.body_nested_models.tutorial009 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_body_updates/test_tutorial001.py b/tests/test_tutorial/test_body_updates/test_tutorial001.py index b5f77af12..5e92ef7ea 100644 --- a/tests/test_tutorial/test_body_updates/test_tutorial001.py +++ b/tests/test_tutorial/test_body_updates/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from body_updates.tutorial001 import app +from docs_src.body_updates.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_conditional_openapi/test_tutorial001.py b/tests/test_tutorial/test_conditional_openapi/test_tutorial001.py index 1914b7c2c..828cd62c1 100644 --- a/tests/test_tutorial/test_conditional_openapi/test_tutorial001.py +++ b/tests/test_tutorial/test_conditional_openapi/test_tutorial001.py @@ -2,7 +2,7 @@ import importlib from fastapi.testclient import TestClient -from conditional_openapi import tutorial001 +from docs_src.conditional_openapi import tutorial001 openapi_schema = { "openapi": "3.0.2", diff --git a/tests/test_tutorial/test_cookie_params/test_tutorial001.py b/tests/test_tutorial/test_cookie_params/test_tutorial001.py index 7b644d9f3..3451dc19e 100644 --- a/tests/test_tutorial/test_cookie_params/test_tutorial001.py +++ b/tests/test_tutorial/test_cookie_params/test_tutorial001.py @@ -1,7 +1,7 @@ import pytest from fastapi.testclient import TestClient -from cookie_params.tutorial001 import app +from docs_src.cookie_params.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_cors/test_tutorial001.py b/tests/test_tutorial/test_cors/test_tutorial001.py index e3f6b7350..f62c9df4f 100644 --- a/tests/test_tutorial/test_cors/test_tutorial001.py +++ b/tests/test_tutorial/test_cors/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from cors.tutorial001 import app +from docs_src.cors.tutorial001 import app def test_cors(): diff --git a/tests/test_tutorial/test_custom_request_and_route/test_tutorial001.py b/tests/test_tutorial/test_custom_request_and_route/test_tutorial001.py index 2546a1274..cc85a8a82 100644 --- a/tests/test_tutorial/test_custom_request_and_route/test_tutorial001.py +++ b/tests/test_tutorial/test_custom_request_and_route/test_tutorial001.py @@ -5,7 +5,7 @@ import pytest from fastapi import Request from fastapi.testclient import TestClient -from custom_request_and_route.tutorial001 import app +from docs_src.custom_request_and_route.tutorial001 import app @app.get("/check-class") diff --git a/tests/test_tutorial/test_custom_request_and_route/test_tutorial002.py b/tests/test_tutorial/test_custom_request_and_route/test_tutorial002.py index 170065f64..d2d27f8a2 100644 --- a/tests/test_tutorial/test_custom_request_and_route/test_tutorial002.py +++ b/tests/test_tutorial/test_custom_request_and_route/test_tutorial002.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from custom_request_and_route.tutorial002 import app +from docs_src.custom_request_and_route.tutorial002 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_custom_request_and_route/test_tutorial003.py b/tests/test_tutorial/test_custom_request_and_route/test_tutorial003.py index 376b1f69b..db5dad7cf 100644 --- a/tests/test_tutorial/test_custom_request_and_route/test_tutorial003.py +++ b/tests/test_tutorial/test_custom_request_and_route/test_tutorial003.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from custom_request_and_route.tutorial003 import app +from docs_src.custom_request_and_route.tutorial003 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_custom_response/test_tutorial001b.py b/tests/test_tutorial/test_custom_response/test_tutorial001b.py index b061ef20b..0f15d5f48 100644 --- a/tests/test_tutorial/test_custom_response/test_tutorial001b.py +++ b/tests/test_tutorial/test_custom_response/test_tutorial001b.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from custom_response.tutorial001b import app +from docs_src.custom_response.tutorial001b import app client = TestClient(app) diff --git a/tests/test_tutorial/test_custom_response/test_tutorial004.py b/tests/test_tutorial/test_custom_response/test_tutorial004.py index 9cc27705f..5d75cce96 100644 --- a/tests/test_tutorial/test_custom_response/test_tutorial004.py +++ b/tests/test_tutorial/test_custom_response/test_tutorial004.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from custom_response.tutorial004 import app +from docs_src.custom_response.tutorial004 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_custom_response/test_tutorial005.py b/tests/test_tutorial/test_custom_response/test_tutorial005.py index d5a74308c..ecf6ee2b9 100644 --- a/tests/test_tutorial/test_custom_response/test_tutorial005.py +++ b/tests/test_tutorial/test_custom_response/test_tutorial005.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from custom_response.tutorial005 import app +from docs_src.custom_response.tutorial005 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_custom_response/test_tutorial006.py b/tests/test_tutorial/test_custom_response/test_tutorial006.py index 07daf2cf2..33a17ea46 100644 --- a/tests/test_tutorial/test_custom_response/test_tutorial006.py +++ b/tests/test_tutorial/test_custom_response/test_tutorial006.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from custom_response.tutorial006 import app +from docs_src.custom_response.tutorial006 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_custom_response/test_tutorial007.py b/tests/test_tutorial/test_custom_response/test_tutorial007.py index 90548b5a0..4ede820b9 100644 --- a/tests/test_tutorial/test_custom_response/test_tutorial007.py +++ b/tests/test_tutorial/test_custom_response/test_tutorial007.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from custom_response.tutorial007 import app +from docs_src.custom_response.tutorial007 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_custom_response/test_tutorial008.py b/tests/test_tutorial/test_custom_response/test_tutorial008.py index 8f158615f..10d88a594 100644 --- a/tests/test_tutorial/test_custom_response/test_tutorial008.py +++ b/tests/test_tutorial/test_custom_response/test_tutorial008.py @@ -2,8 +2,8 @@ from pathlib import Path from fastapi.testclient import TestClient -from custom_response import tutorial008 -from custom_response.tutorial008 import app +from docs_src.custom_response import tutorial008 +from docs_src.custom_response.tutorial008 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_dependencies/test_tutorial001.py b/tests/test_tutorial/test_dependencies/test_tutorial001.py index 73d65cf50..8b53157cd 100644 --- a/tests/test_tutorial/test_dependencies/test_tutorial001.py +++ b/tests/test_tutorial/test_dependencies/test_tutorial001.py @@ -1,7 +1,7 @@ import pytest from fastapi.testclient import TestClient -from dependencies.tutorial001 import app +from docs_src.dependencies.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_dependencies/test_tutorial004.py b/tests/test_tutorial/test_dependencies/test_tutorial004.py index bf62e9cbc..eb21f6524 100644 --- a/tests/test_tutorial/test_dependencies/test_tutorial004.py +++ b/tests/test_tutorial/test_dependencies/test_tutorial004.py @@ -1,7 +1,7 @@ import pytest from fastapi.testclient import TestClient -from dependencies.tutorial004 import app +from docs_src.dependencies.tutorial004 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_dependencies/test_tutorial006.py b/tests/test_tutorial/test_dependencies/test_tutorial006.py index f3279bfe6..c08992ec8 100644 --- a/tests/test_tutorial/test_dependencies/test_tutorial006.py +++ b/tests/test_tutorial/test_dependencies/test_tutorial006.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from dependencies.tutorial006 import app +from docs_src.dependencies.tutorial006 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_events/test_tutorial001.py b/tests/test_tutorial/test_events/test_tutorial001.py index 2ab89b069..e3587a0e8 100644 --- a/tests/test_tutorial/test_events/test_tutorial001.py +++ b/tests/test_tutorial/test_events/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from events.tutorial001 import app +from docs_src.events.tutorial001 import app openapi_schema = { "openapi": "3.0.2", diff --git a/tests/test_tutorial/test_events/test_tutorial002.py b/tests/test_tutorial/test_events/test_tutorial002.py index c06ea3f1c..f6ac1e07b 100644 --- a/tests/test_tutorial/test_events/test_tutorial002.py +++ b/tests/test_tutorial/test_events/test_tutorial002.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from events.tutorial002 import app +from docs_src.events.tutorial002 import app openapi_schema = { "openapi": "3.0.2", diff --git a/tests/test_tutorial/test_extending_openapi/test_tutorial001.py b/tests/test_tutorial/test_extending_openapi/test_tutorial001.py index 88997f59d..ec56e9ca6 100644 --- a/tests/test_tutorial/test_extending_openapi/test_tutorial001.py +++ b/tests/test_tutorial/test_extending_openapi/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from extending_openapi.tutorial001 import app +from docs_src.extending_openapi.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_extra_data_types/test_tutorial001.py b/tests/test_tutorial/test_extra_data_types/test_tutorial001.py index 72de6308b..68b7d61dc 100644 --- a/tests/test_tutorial/test_extra_data_types/test_tutorial001.py +++ b/tests/test_tutorial/test_extra_data_types/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from extra_data_types.tutorial001 import app +from docs_src.extra_data_types.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_extra_models/test_tutorial003.py b/tests/test_tutorial/test_extra_models/test_tutorial003.py index 150b899c6..a2a325c77 100644 --- a/tests/test_tutorial/test_extra_models/test_tutorial003.py +++ b/tests/test_tutorial/test_extra_models/test_tutorial003.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from extra_models.tutorial003 import app +from docs_src.extra_models.tutorial003 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_extra_models/test_tutorial004.py b/tests/test_tutorial/test_extra_models/test_tutorial004.py index 08f859656..548fb8834 100644 --- a/tests/test_tutorial/test_extra_models/test_tutorial004.py +++ b/tests/test_tutorial/test_extra_models/test_tutorial004.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from extra_models.tutorial004 import app +from docs_src.extra_models.tutorial004 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_extra_models/test_tutorial005.py b/tests/test_tutorial/test_extra_models/test_tutorial005.py index bce5efece..c3dfaa42f 100644 --- a/tests/test_tutorial/test_extra_models/test_tutorial005.py +++ b/tests/test_tutorial/test_extra_models/test_tutorial005.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from extra_models.tutorial005 import app +from docs_src.extra_models.tutorial005 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_first_steps/test_tutorial001.py b/tests/test_tutorial/test_first_steps/test_tutorial001.py index 454745dd7..48d42285c 100644 --- a/tests/test_tutorial/test_first_steps/test_tutorial001.py +++ b/tests/test_tutorial/test_first_steps/test_tutorial001.py @@ -1,7 +1,7 @@ import pytest from fastapi.testclient import TestClient -from first_steps.tutorial001 import app +from docs_src.first_steps.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_handling_errors/test_tutorial001.py b/tests/test_tutorial/test_handling_errors/test_tutorial001.py index 5a80bc5f6..6b62293d8 100644 --- a/tests/test_tutorial/test_handling_errors/test_tutorial001.py +++ b/tests/test_tutorial/test_handling_errors/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from handling_errors.tutorial001 import app +from docs_src.handling_errors.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_handling_errors/test_tutorial002.py b/tests/test_tutorial/test_handling_errors/test_tutorial002.py index 4ffce6b2c..d2ce0bf9d 100644 --- a/tests/test_tutorial/test_handling_errors/test_tutorial002.py +++ b/tests/test_tutorial/test_handling_errors/test_tutorial002.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from handling_errors.tutorial002 import app +from docs_src.handling_errors.tutorial002 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_handling_errors/test_tutorial003.py b/tests/test_tutorial/test_handling_errors/test_tutorial003.py index 48da5db7c..ca9d94e3c 100644 --- a/tests/test_tutorial/test_handling_errors/test_tutorial003.py +++ b/tests/test_tutorial/test_handling_errors/test_tutorial003.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from handling_errors.tutorial003 import app +from docs_src.handling_errors.tutorial003 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_handling_errors/test_tutorial004.py b/tests/test_tutorial/test_handling_errors/test_tutorial004.py index 58b97c003..d95debf37 100644 --- a/tests/test_tutorial/test_handling_errors/test_tutorial004.py +++ b/tests/test_tutorial/test_handling_errors/test_tutorial004.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from handling_errors.tutorial004 import app +from docs_src.handling_errors.tutorial004 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_handling_errors/test_tutorial005.py b/tests/test_tutorial/test_handling_errors/test_tutorial005.py index 083f5141c..cedcaae70 100644 --- a/tests/test_tutorial/test_handling_errors/test_tutorial005.py +++ b/tests/test_tutorial/test_handling_errors/test_tutorial005.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from handling_errors.tutorial005 import app +from docs_src.handling_errors.tutorial005 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_handling_errors/test_tutorial006.py b/tests/test_tutorial/test_handling_errors/test_tutorial006.py index 2b945fe90..8b6c1e7ed 100644 --- a/tests/test_tutorial/test_handling_errors/test_tutorial006.py +++ b/tests/test_tutorial/test_handling_errors/test_tutorial006.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from handling_errors.tutorial006 import app +from docs_src.handling_errors.tutorial006 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_header_params/test_tutorial001.py b/tests/test_tutorial/test_header_params/test_tutorial001.py index f38e8bf9e..0f05b9e8c 100644 --- a/tests/test_tutorial/test_header_params/test_tutorial001.py +++ b/tests/test_tutorial/test_header_params/test_tutorial001.py @@ -1,7 +1,7 @@ import pytest from fastapi.testclient import TestClient -from header_params.tutorial001 import app +from docs_src.header_params.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_metadata/test_tutorial001.py b/tests/test_tutorial/test_metadata/test_tutorial001.py index 5f00d3957..aae79dcc4 100644 --- a/tests/test_tutorial/test_metadata/test_tutorial001.py +++ b/tests/test_tutorial/test_metadata/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from metadata.tutorial001 import app +from docs_src.metadata.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_metadata/test_tutorial004.py b/tests/test_tutorial/test_metadata/test_tutorial004.py index 1ec59d3fe..2d255b8b0 100644 --- a/tests/test_tutorial/test_metadata/test_tutorial004.py +++ b/tests/test_tutorial/test_metadata/test_tutorial004.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from metadata.tutorial004 import app +from docs_src.metadata.tutorial004 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py b/tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py index 337e703d2..b30427d08 100644 --- a/tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py +++ b/tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from openapi_callbacks.tutorial001 import app, invoice_notification +from docs_src.openapi_callbacks.tutorial001 import app, invoice_notification client = TestClient(app) diff --git a/tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial001.py b/tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial001.py index ca94ff1f1..3b5301348 100644 --- a/tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial001.py +++ b/tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from path_operation_advanced_configuration.tutorial001 import app +from docs_src.path_operation_advanced_configuration.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial002.py b/tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial002.py index 1aa001ad4..01acb664c 100644 --- a/tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial002.py +++ b/tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial002.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from path_operation_advanced_configuration.tutorial002 import app +from docs_src.path_operation_advanced_configuration.tutorial002 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial003.py b/tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial003.py index 16559a33e..4a23db7bc 100644 --- a/tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial003.py +++ b/tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial003.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from path_operation_advanced_configuration.tutorial003 import app +from docs_src.path_operation_advanced_configuration.tutorial003 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial004.py b/tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial004.py index f092703df..f2ec2c7e5 100644 --- a/tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial004.py +++ b/tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial004.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from path_operation_advanced_configuration.tutorial004 import app +from docs_src.path_operation_advanced_configuration.tutorial004 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_path_operation_configurations/test_tutorial005.py b/tests/test_tutorial/test_path_operation_configurations/test_tutorial005.py index 107fae09c..d21640946 100644 --- a/tests/test_tutorial/test_path_operation_configurations/test_tutorial005.py +++ b/tests/test_tutorial/test_path_operation_configurations/test_tutorial005.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from path_operation_configuration.tutorial005 import app +from docs_src.path_operation_configuration.tutorial005 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_path_operation_configurations/test_tutorial006.py b/tests/test_tutorial/test_path_operation_configurations/test_tutorial006.py index bfcd45411..582caed44 100644 --- a/tests/test_tutorial/test_path_operation_configurations/test_tutorial006.py +++ b/tests/test_tutorial/test_path_operation_configurations/test_tutorial006.py @@ -1,7 +1,7 @@ import pytest from fastapi.testclient import TestClient -from path_operation_configuration.tutorial006 import app +from docs_src.path_operation_configuration.tutorial006 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_path_params/test_tutorial004.py b/tests/test_tutorial/test_path_params/test_tutorial004.py index a3343744f..131bf773b 100644 --- a/tests/test_tutorial/test_path_params/test_tutorial004.py +++ b/tests/test_tutorial/test_path_params/test_tutorial004.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from path_params.tutorial004 import app +from docs_src.path_params.tutorial004 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_path_params/test_tutorial005.py b/tests/test_tutorial/test_path_params/test_tutorial005.py index 836a6264b..6e9333084 100644 --- a/tests/test_tutorial/test_path_params/test_tutorial005.py +++ b/tests/test_tutorial/test_path_params/test_tutorial005.py @@ -1,7 +1,7 @@ import pytest from fastapi.testclient import TestClient -from path_params.tutorial005 import app +from docs_src.path_params.tutorial005 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_query_params/test_tutorial005.py b/tests/test_tutorial/test_query_params/test_tutorial005.py index 59acaae9a..aabc0af4f 100644 --- a/tests/test_tutorial/test_query_params/test_tutorial005.py +++ b/tests/test_tutorial/test_query_params/test_tutorial005.py @@ -1,7 +1,7 @@ import pytest from fastapi.testclient import TestClient -from query_params.tutorial005 import app +from docs_src.query_params.tutorial005 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_query_params/test_tutorial006.py b/tests/test_tutorial/test_query_params/test_tutorial006.py index a76314e43..042a0e1f8 100644 --- a/tests/test_tutorial/test_query_params/test_tutorial006.py +++ b/tests/test_tutorial/test_query_params/test_tutorial006.py @@ -1,7 +1,7 @@ import pytest from fastapi.testclient import TestClient -from query_params.tutorial006 import app +from docs_src.query_params.tutorial006 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_query_params_str_validations/test_tutorial001.py b/tests/test_tutorial/test_query_params_str_validations/test_tutorial001.py index 8bdba00b7..709bf6956 100644 --- a/tests/test_tutorial/test_query_params_str_validations/test_tutorial001.py +++ b/tests/test_tutorial/test_query_params_str_validations/test_tutorial001.py @@ -1,7 +1,7 @@ import pytest from fastapi.testclient import TestClient -from query_params_str_validations.tutorial010 import app +from docs_src.query_params_str_validations.tutorial010 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_query_params_str_validations/test_tutorial011.py b/tests/test_tutorial/test_query_params_str_validations/test_tutorial011.py index fb37f4be2..6ae10296f 100644 --- a/tests/test_tutorial/test_query_params_str_validations/test_tutorial011.py +++ b/tests/test_tutorial/test_query_params_str_validations/test_tutorial011.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from query_params_str_validations.tutorial011 import app +from docs_src.query_params_str_validations.tutorial011 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_query_params_str_validations/test_tutorial012.py b/tests/test_tutorial/test_query_params_str_validations/test_tutorial012.py index c05d8ac21..724c975f8 100644 --- a/tests/test_tutorial/test_query_params_str_validations/test_tutorial012.py +++ b/tests/test_tutorial/test_query_params_str_validations/test_tutorial012.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from query_params_str_validations.tutorial012 import app +from docs_src.query_params_str_validations.tutorial012 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_query_params_str_validations/test_tutorial013.py b/tests/test_tutorial/test_query_params_str_validations/test_tutorial013.py index f2293105c..ad5597913 100644 --- a/tests/test_tutorial/test_query_params_str_validations/test_tutorial013.py +++ b/tests/test_tutorial/test_query_params_str_validations/test_tutorial013.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from query_params_str_validations.tutorial013 import app +from docs_src.query_params_str_validations.tutorial013 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_request_files/test_tutorial001.py b/tests/test_tutorial/test_request_files/test_tutorial001.py index 9aea331f3..4eba18496 100644 --- a/tests/test_tutorial/test_request_files/test_tutorial001.py +++ b/tests/test_tutorial/test_request_files/test_tutorial001.py @@ -2,7 +2,7 @@ import os from fastapi.testclient import TestClient -from request_files.tutorial001 import app +from docs_src.request_files.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_request_files/test_tutorial002.py b/tests/test_tutorial/test_request_files/test_tutorial002.py index 24e9eae2f..58fe4269f 100644 --- a/tests/test_tutorial/test_request_files/test_tutorial002.py +++ b/tests/test_tutorial/test_request_files/test_tutorial002.py @@ -2,7 +2,7 @@ import os from fastapi.testclient import TestClient -from request_files.tutorial002 import app +from docs_src.request_files.tutorial002 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_request_forms/test_tutorial001.py b/tests/test_tutorial/test_request_forms/test_tutorial001.py index bed291e83..3d271b531 100644 --- a/tests/test_tutorial/test_request_forms/test_tutorial001.py +++ b/tests/test_tutorial/test_request_forms/test_tutorial001.py @@ -1,7 +1,7 @@ import pytest from fastapi.testclient import TestClient -from request_forms.tutorial001 import app +from docs_src.request_forms.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py b/tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py index f7daf7efa..6a98ee324 100644 --- a/tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py +++ b/tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py @@ -3,7 +3,7 @@ from pathlib import Path from fastapi.testclient import TestClient -from request_forms_and_files.tutorial001 import app +from docs_src.request_forms_and_files.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_response_change_status_code/test_tutorial001.py b/tests/test_tutorial/test_response_change_status_code/test_tutorial001.py index 7c4711c17..8ce3dcf1a 100644 --- a/tests/test_tutorial/test_response_change_status_code/test_tutorial001.py +++ b/tests/test_tutorial/test_response_change_status_code/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from response_change_status_code.tutorial001 import app +from docs_src.response_change_status_code.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_response_cookies/test_tutorial001.py b/tests/test_tutorial/test_response_cookies/test_tutorial001.py index 8088be3c8..eecd1a24c 100644 --- a/tests/test_tutorial/test_response_cookies/test_tutorial001.py +++ b/tests/test_tutorial/test_response_cookies/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from response_cookies.tutorial001 import app +from docs_src.response_cookies.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_response_cookies/test_tutorial002.py b/tests/test_tutorial/test_response_cookies/test_tutorial002.py index fb0c07023..3e390025f 100644 --- a/tests/test_tutorial/test_response_cookies/test_tutorial002.py +++ b/tests/test_tutorial/test_response_cookies/test_tutorial002.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from response_cookies.tutorial002 import app +from docs_src.response_cookies.tutorial002 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_response_headers/test_tutorial001.py b/tests/test_tutorial/test_response_headers/test_tutorial001.py index cc58b4a9c..1549d6b5b 100644 --- a/tests/test_tutorial/test_response_headers/test_tutorial001.py +++ b/tests/test_tutorial/test_response_headers/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from response_headers.tutorial001 import app +from docs_src.response_headers.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_response_headers/test_tutorial002.py b/tests/test_tutorial/test_response_headers/test_tutorial002.py index cec019693..2826833f8 100644 --- a/tests/test_tutorial/test_response_headers/test_tutorial002.py +++ b/tests/test_tutorial/test_response_headers/test_tutorial002.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from response_headers.tutorial002 import app +from docs_src.response_headers.tutorial002 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_response_model/test_tutorial003.py b/tests/test_tutorial/test_response_model/test_tutorial003.py index 131bd972c..44f2fb7ca 100644 --- a/tests/test_tutorial/test_response_model/test_tutorial003.py +++ b/tests/test_tutorial/test_response_model/test_tutorial003.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from response_model.tutorial003 import app +from docs_src.response_model.tutorial003 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_response_model/test_tutorial004.py b/tests/test_tutorial/test_response_model/test_tutorial004.py index 0cd73c423..19303982b 100644 --- a/tests/test_tutorial/test_response_model/test_tutorial004.py +++ b/tests/test_tutorial/test_response_model/test_tutorial004.py @@ -1,7 +1,7 @@ import pytest from fastapi.testclient import TestClient -from response_model.tutorial004 import app +from docs_src.response_model.tutorial004 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_response_model/test_tutorial005.py b/tests/test_tutorial/test_response_model/test_tutorial005.py index 1d4d917ea..9ca5463e6 100644 --- a/tests/test_tutorial/test_response_model/test_tutorial005.py +++ b/tests/test_tutorial/test_response_model/test_tutorial005.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from response_model.tutorial005 import app +from docs_src.response_model.tutorial005 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_response_model/test_tutorial006.py b/tests/test_tutorial/test_response_model/test_tutorial006.py index 2154fb478..25eb6e333 100644 --- a/tests/test_tutorial/test_response_model/test_tutorial006.py +++ b/tests/test_tutorial/test_response_model/test_tutorial006.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from response_model.tutorial006 import app +from docs_src.response_model.tutorial006 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_security/test_tutorial001.py b/tests/test_tutorial/test_security/test_tutorial001.py index 175227c61..82818b430 100644 --- a/tests/test_tutorial/test_security/test_tutorial001.py +++ b/tests/test_tutorial/test_security/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from security.tutorial001 import app +from docs_src.security.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_security/test_tutorial003.py b/tests/test_tutorial/test_security/test_tutorial003.py index 523a068d5..bf2a81723 100644 --- a/tests/test_tutorial/test_security/test_tutorial003.py +++ b/tests/test_tutorial/test_security/test_tutorial003.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from security.tutorial003 import app +from docs_src.security.tutorial003 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_security/test_tutorial005.py b/tests/test_tutorial/test_security/test_tutorial005.py index 05a674ba0..509b200da 100644 --- a/tests/test_tutorial/test_security/test_tutorial005.py +++ b/tests/test_tutorial/test_security/test_tutorial005.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from security.tutorial005 import ( +from docs_src.security.tutorial005 import ( app, create_access_token, fake_users_db, diff --git a/tests/test_tutorial/test_security/test_tutorial006.py b/tests/test_tutorial/test_security/test_tutorial006.py index e648b4d98..3b0a36ebc 100644 --- a/tests/test_tutorial/test_security/test_tutorial006.py +++ b/tests/test_tutorial/test_security/test_tutorial006.py @@ -3,7 +3,7 @@ from base64 import b64encode from fastapi.testclient import TestClient from requests.auth import HTTPBasicAuth -from security.tutorial006 import app +from docs_src.security.tutorial006 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_settings/test_app02.py b/tests/test_tutorial/test_settings/test_app02.py index 3f100a4f4..2fb371202 100644 --- a/tests/test_tutorial/test_settings/test_app02.py +++ b/tests/test_tutorial/test_settings/test_app02.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from settings.app02 import main, test_main +from docs_src.settings.app02 import main, test_main client = TestClient(main.app) diff --git a/tests/test_tutorial/test_sub_applications/test_tutorial001.py b/tests/test_tutorial/test_sub_applications/test_tutorial001.py index f8e108f29..4e1dc9e09 100644 --- a/tests/test_tutorial/test_sub_applications/test_tutorial001.py +++ b/tests/test_tutorial/test_sub_applications/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from sub_applications.tutorial001 import app +from docs_src.sub_applications.tutorial001 import app client = TestClient(app) diff --git a/tests/test_tutorial/test_wsgi/test_tutorial001.py b/tests/test_tutorial/test_wsgi/test_tutorial001.py index 8eee4d465..4f8225273 100644 --- a/tests/test_tutorial/test_wsgi/test_tutorial001.py +++ b/tests/test_tutorial/test_wsgi/test_tutorial001.py @@ -1,6 +1,6 @@ from fastapi.testclient import TestClient -from wsgi.tutorial001 import app +from docs_src.wsgi.tutorial001 import app client = TestClient(app)