mirror of
https://github.com/fastapi/fastapi.git
synced 2026-04-09 09:28:28 -04:00
⬆ Upgrade isort to version 5.x.x (#1670)
* Update isort script to match changes in the new release, isort v5.0.2 * Downgrade isort to version v4.3.21 * Add an alternative flag to --recursive in isort v5.0.2 * Add isort config file * 🚚 Import from docs_src for tests * 🎨 Format dependencies.utils * 🎨 Remove isort combine_as_imports, keep black profile * 🔧 Update isort config, use pyproject.toml, Black profile * 🔧 Update format scripts to use explicit directories to format otherwise it would try to format venv env directories, I have several with different Python versions * 🎨 Format NoSQL tutorial after re-sorting imports * 🎨 Fix format for __init__.py Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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():
|
||||
|
||||
@@ -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():
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from cors.tutorial001 import app
|
||||
from docs_src.cors.tutorial001 import app
|
||||
|
||||
|
||||
def test_cors():
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from dependencies.tutorial006 import app
|
||||
from docs_src.dependencies.tutorial006 import app
|
||||
|
||||
client = TestClient(app)
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from metadata.tutorial001 import app
|
||||
from docs_src.metadata.tutorial001 import app
|
||||
|
||||
client = TestClient(app)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from metadata.tutorial004 import app
|
||||
from docs_src.metadata.tutorial004 import app
|
||||
|
||||
client = TestClient(app)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from security.tutorial001 import app
|
||||
from docs_src.security.tutorial001 import app
|
||||
|
||||
client = TestClient(app)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from security.tutorial003 import app
|
||||
from docs_src.security.tutorial003 import app
|
||||
|
||||
client = TestClient(app)
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
from wsgi.tutorial001 import app
|
||||
from docs_src.wsgi.tutorial001 import app
|
||||
|
||||
client = TestClient(app)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user