From eb8c496e10663c1e7d18f89489bbe1cb113a14e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 24 Aug 2021 15:41:03 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Format=20tests,=20sort=20and=20r?= =?UTF-8?q?emove=20unused=20imports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/conftest.py | 3 ++- .../test_tutorial001_tutorial002.py | 3 ++- .../test_code_structure/test_tutorial001.py | 4 ---- .../test_code_structure/test_tutorial002.py | 4 ---- .../test_tutorial001.py | 6 ------ .../test_connect/test_delete/test_tutorial001.py | 4 ---- .../test_connect/test_insert/test_tutorial001.py | 4 ---- .../test_select/test_tutorial001_tutorial002.py | 4 ---- .../test_connect/test_select/test_tutorial003.py | 4 ---- .../test_connect/test_select/test_tutorial004.py | 4 ---- .../test_connect/test_select/test_tutorial005.py | 4 ---- .../test_connect/test_update/test_tutorial001.py | 4 ---- .../test_create_db_and_table/test_tutorial002.py | 2 -- .../test_delete/test_tutorial001_tutorial002.py | 3 +-- .../test_tutorial001_tests001.py | 16 +++++----------- .../test_tutorial001_tests002.py | 16 +++++----------- .../test_tutorial001_tests003.py | 16 +++++----------- .../test_tutorial001_tests004.py | 16 +++++----------- .../test_tutorial001_tests005.py | 11 ++--------- .../test_tutorial001_tests006.py | 15 ++++----------- .../test_tutorial001_tests_main.py | 16 ++++++---------- .../test_fastapi/test_delete/test_tutorial001.py | 8 +------- .../test_limit_and_offset/test_tutorial001.py | 8 +------- .../test_multiple_models/test_tutorial001.py | 8 +------- .../test_multiple_models/test_tutorial002.py | 8 +------- .../test_read_one/test_tutorial001.py | 8 +------- .../test_relationships/test_tutorial001.py | 8 +------- .../test_response_model/test_tutorial001.py | 8 +------- .../test_tutorial001.py | 8 +------- .../test_simple_hero_api/test_tutorial001.py | 8 +------- .../test_fastapi/test_teams/test_tutorial001.py | 10 ++-------- .../test_fastapi/test_update/test_tutorial001.py | 8 +------- .../test_insert/test_tutorial001.py | 2 +- .../test_insert/test_tutorial002.py | 2 +- .../test_insert/test_tutorial003.py | 2 +- .../test_limit_and_offset/test_tutorial001.py | 3 +-- .../test_limit_and_offset/test_tutorial002.py | 3 +-- .../test_limit_and_offset/test_tutorial003.py | 3 +-- .../test_limit_and_offset/test_tutorial004.py | 3 +-- .../test_many_to_many/test_tutorial001.py | 4 ---- .../test_many_to_many/test_tutorial002.py | 4 ---- .../test_many_to_many/test_tutorial003.py | 4 ---- tests/test_tutorial/test_one/test_tutorial001.py | 2 +- tests/test_tutorial/test_one/test_tutorial002.py | 2 +- tests/test_tutorial/test_one/test_tutorial003.py | 2 +- tests/test_tutorial/test_one/test_tutorial004.py | 7 +++---- tests/test_tutorial/test_one/test_tutorial005.py | 7 +++---- tests/test_tutorial/test_one/test_tutorial006.py | 2 +- tests/test_tutorial/test_one/test_tutorial007.py | 2 +- tests/test_tutorial/test_one/test_tutorial008.py | 2 +- tests/test_tutorial/test_one/test_tutorial009.py | 2 +- .../test_back_populates/test_tutorial001.py | 8 ++------ .../test_back_populates/test_tutorial002.py | 4 ---- .../test_back_populates/test_tutorial003.py | 6 ------ .../test_tutorial001.py | 4 ---- .../test_tutorial001.py | 4 ---- .../test_read_relationships/test_tutorial001.py | 4 ---- .../test_read_relationships/test_tutorial002.py | 4 ---- .../test_select/test_tutorial001_tutorial002.py | 1 + .../test_update/test_tutorial001_tutorial002.py | 3 +-- .../test_update/test_tutorial003_tutorial004.py | 3 +-- .../test_tutorial/test_where/test_tutorial001.py | 2 +- .../test_tutorial/test_where/test_tutorial002.py | 2 +- .../test_tutorial/test_where/test_tutorial003.py | 2 +- .../test_tutorial/test_where/test_tutorial004.py | 2 +- .../test_tutorial/test_where/test_tutorial005.py | 2 +- .../test_tutorial/test_where/test_tutorial006.py | 2 +- .../test_tutorial/test_where/test_tutorial007.py | 2 +- .../test_tutorial/test_where/test_tutorial008.py | 2 +- .../test_tutorial/test_where/test_tutorial009.py | 2 +- .../test_tutorial/test_where/test_tutorial010.py | 2 +- .../test_tutorial/test_where/test_tutorial011.py | 2 +- 72 files changed, 85 insertions(+), 285 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 15c7cac..cd66420 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,10 +2,11 @@ import shutil import subprocess from pathlib import Path from typing import Any, Callable, Dict, List, Union + import pytest +from pydantic import BaseModel from sqlmodel import SQLModel from sqlmodel.main import default_registry -from pydantic import BaseModel top_level_path = Path(__file__).resolve().parent.parent docs_src_path = top_level_path / "docs_src" diff --git a/tests/test_tutorial/test_automatic_id_none_refresh/test_tutorial001_tutorial002.py b/tests/test_tutorial/test_automatic_id_none_refresh/test_tutorial001_tutorial002.py index c91637f..399f431 100644 --- a/tests/test_tutorial/test_automatic_id_none_refresh/test_tutorial001_tutorial002.py +++ b/tests/test_tutorial/test_automatic_id_none_refresh/test_tutorial001_tutorial002.py @@ -1,9 +1,10 @@ -from tests.conftest import get_testing_print_function from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine +from tests.conftest import get_testing_print_function + def check_calls(calls: List[List[Union[str, Dict[str, Any]]]]): assert calls[0] == ["Before interacting with the database"] diff --git a/tests/test_tutorial/test_code_structure/test_tutorial001.py b/tests/test_tutorial/test_code_structure/test_tutorial001.py index ec0990d..4192e00 100644 --- a/tests/test_tutorial/test_code_structure/test_tutorial001.py +++ b/tests/test_tutorial/test_code_structure/test_tutorial001.py @@ -1,10 +1,6 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector from sqlmodel import create_engine -from sqlmodel.pool import StaticPool from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_code_structure/test_tutorial002.py b/tests/test_tutorial/test_code_structure/test_tutorial002.py index 32bdf83..37e4e54 100644 --- a/tests/test_tutorial/test_code_structure/test_tutorial002.py +++ b/tests/test_tutorial/test_code_structure/test_tutorial002.py @@ -1,10 +1,6 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector from sqlmodel import create_engine -from sqlmodel.pool import StaticPool from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_connect/test_create_connected_tables/test_tutorial001.py b/tests/test_tutorial/test_connect/test_create_connected_tables/test_tutorial001.py index faaaa47..e3e0799 100644 --- a/tests/test_tutorial/test_connect/test_create_connected_tables/test_tutorial001.py +++ b/tests/test_tutorial/test_connect/test_create_connected_tables/test_tutorial001.py @@ -1,12 +1,6 @@ -from typing import Any, Dict, List, Union -from unittest.mock import patch - from sqlalchemy import inspect from sqlalchemy.engine.reflection import Inspector from sqlmodel import create_engine -from sqlmodel.pool import StaticPool - -from ....conftest import get_testing_print_function def test_tutorial001(clear_sqlmodel): diff --git a/tests/test_tutorial/test_connect/test_delete/test_tutorial001.py b/tests/test_tutorial/test_connect/test_delete/test_tutorial001.py index 1bd0cb6..a5db386 100644 --- a/tests/test_tutorial/test_connect/test_delete/test_tutorial001.py +++ b/tests/test_tutorial/test_connect/test_delete/test_tutorial001.py @@ -1,10 +1,6 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector from sqlmodel import create_engine -from sqlmodel.pool import StaticPool from ....conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_connect/test_insert/test_tutorial001.py b/tests/test_tutorial/test_connect/test_insert/test_tutorial001.py index 4496bdc..8c8a303 100644 --- a/tests/test_tutorial/test_connect/test_insert/test_tutorial001.py +++ b/tests/test_tutorial/test_connect/test_insert/test_tutorial001.py @@ -1,10 +1,6 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector from sqlmodel import create_engine -from sqlmodel.pool import StaticPool from ....conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_connect/test_select/test_tutorial001_tutorial002.py b/tests/test_tutorial/test_connect/test_select/test_tutorial001_tutorial002.py index af23f93..32b2948 100644 --- a/tests/test_tutorial/test_connect/test_select/test_tutorial001_tutorial002.py +++ b/tests/test_tutorial/test_connect/test_select/test_tutorial001_tutorial002.py @@ -1,10 +1,6 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector from sqlmodel import create_engine -from sqlmodel.pool import StaticPool from ....conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_connect/test_select/test_tutorial003.py b/tests/test_tutorial/test_connect/test_select/test_tutorial003.py index 32b61b0..ad6d4cc 100644 --- a/tests/test_tutorial/test_connect/test_select/test_tutorial003.py +++ b/tests/test_tutorial/test_connect/test_select/test_tutorial003.py @@ -1,10 +1,6 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector from sqlmodel import create_engine -from sqlmodel.pool import StaticPool from ....conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_connect/test_select/test_tutorial004.py b/tests/test_tutorial/test_connect/test_select/test_tutorial004.py index d796724..ebc273f 100644 --- a/tests/test_tutorial/test_connect/test_select/test_tutorial004.py +++ b/tests/test_tutorial/test_connect/test_select/test_tutorial004.py @@ -1,10 +1,6 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector from sqlmodel import create_engine -from sqlmodel.pool import StaticPool from ....conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_connect/test_select/test_tutorial005.py b/tests/test_tutorial/test_connect/test_select/test_tutorial005.py index 2418232..400c648 100644 --- a/tests/test_tutorial/test_connect/test_select/test_tutorial005.py +++ b/tests/test_tutorial/test_connect/test_select/test_tutorial005.py @@ -1,10 +1,6 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector from sqlmodel import create_engine -from sqlmodel.pool import StaticPool from ....conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_connect/test_update/test_tutorial001.py b/tests/test_tutorial/test_connect/test_update/test_tutorial001.py index f209a33..d687594 100644 --- a/tests/test_tutorial/test_connect/test_update/test_tutorial001.py +++ b/tests/test_tutorial/test_connect/test_update/test_tutorial001.py @@ -1,10 +1,6 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector from sqlmodel import create_engine -from sqlmodel.pool import StaticPool from ....conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_create_db_and_table/test_tutorial002.py b/tests/test_tutorial/test_create_db_and_table/test_tutorial002.py index 12155f8..3a24ae1 100644 --- a/tests/test_tutorial/test_create_db_and_table/test_tutorial002.py +++ b/tests/test_tutorial/test_create_db_and_table/test_tutorial002.py @@ -1,5 +1,3 @@ -from pathlib import Path - from sqlalchemy import inspect from sqlalchemy.engine.reflection import Inspector from sqlmodel import create_engine diff --git a/tests/test_tutorial/test_delete/test_tutorial001_tutorial002.py b/tests/test_tutorial/test_delete/test_tutorial001_tutorial002.py index 55750ed..1d6497b 100644 --- a/tests/test_tutorial/test_delete/test_tutorial001_tutorial002.py +++ b/tests/test_tutorial/test_delete/test_tutorial001_tutorial002.py @@ -1,9 +1,8 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine -from ...conftest import get_testing_print_function +from ...conftest import get_testing_print_function expected_calls = [ [ diff --git a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests001.py b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests001.py index ac2c713..4da11c2 100644 --- a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests001.py +++ b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests001.py @@ -1,18 +1,11 @@ import importlib -from typing import Any, Dict, List, Union -from unittest.mock import patch - -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector -from sqlmodel import create_engine -from fastapi.testclient import TestClient -from sqlmodel.pool import StaticPool - -from docs_src.tutorial.fastapi.app_testing.tutorial001 import test_main_001 as test_mod -from docs_src.tutorial.fastapi.app_testing.tutorial001 import main as app_mod import pytest +from docs_src.tutorial.fastapi.app_testing.tutorial001 import main as app_mod +from docs_src.tutorial.fastapi.app_testing.tutorial001 import test_main_001 as test_mod + + @pytest.fixture(name="prepare", autouse=True) def prepare_fixture(clear_sqlmodel): # Trigger side effects of registering table models in SQLModel @@ -20,5 +13,6 @@ def prepare_fixture(clear_sqlmodel): importlib.reload(app_mod) importlib.reload(test_mod) + def test_tutorial(): test_mod.test_create_hero() diff --git a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests002.py b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests002.py index ac5c16f..241e923 100644 --- a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests002.py +++ b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests002.py @@ -1,18 +1,11 @@ import importlib -from typing import Any, Dict, List, Union -from unittest.mock import patch - -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector -from sqlmodel import create_engine -from fastapi.testclient import TestClient -from sqlmodel.pool import StaticPool - -from docs_src.tutorial.fastapi.app_testing.tutorial001 import test_main_002 as test_mod -from docs_src.tutorial.fastapi.app_testing.tutorial001 import main as app_mod import pytest +from docs_src.tutorial.fastapi.app_testing.tutorial001 import main as app_mod +from docs_src.tutorial.fastapi.app_testing.tutorial001 import test_main_002 as test_mod + + @pytest.fixture(name="prepare", autouse=True) def prepare_fixture(clear_sqlmodel): # Trigger side effects of registering table models in SQLModel @@ -20,5 +13,6 @@ def prepare_fixture(clear_sqlmodel): importlib.reload(app_mod) importlib.reload(test_mod) + def test_tutorial(): test_mod.test_create_hero() diff --git a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests003.py b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests003.py index 3f6863a..32e0161 100644 --- a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests003.py +++ b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests003.py @@ -1,18 +1,11 @@ import importlib -from typing import Any, Dict, List, Union -from unittest.mock import patch - -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector -from sqlmodel import create_engine -from fastapi.testclient import TestClient -from sqlmodel.pool import StaticPool - -from docs_src.tutorial.fastapi.app_testing.tutorial001 import test_main_003 as test_mod -from docs_src.tutorial.fastapi.app_testing.tutorial001 import main as app_mod import pytest +from docs_src.tutorial.fastapi.app_testing.tutorial001 import main as app_mod +from docs_src.tutorial.fastapi.app_testing.tutorial001 import test_main_003 as test_mod + + @pytest.fixture(name="prepare", autouse=True) def prepare_fixture(clear_sqlmodel): # Trigger side effects of registering table models in SQLModel @@ -20,5 +13,6 @@ def prepare_fixture(clear_sqlmodel): importlib.reload(app_mod) importlib.reload(test_mod) + def test_tutorial(): test_mod.test_create_hero() diff --git a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests004.py b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests004.py index c5c31e0..c6402b2 100644 --- a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests004.py +++ b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests004.py @@ -1,18 +1,11 @@ import importlib -from typing import Any, Dict, List, Union -from unittest.mock import patch - -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector -from sqlmodel import create_engine -from fastapi.testclient import TestClient -from sqlmodel.pool import StaticPool - -from docs_src.tutorial.fastapi.app_testing.tutorial001 import test_main_004 as test_mod -from docs_src.tutorial.fastapi.app_testing.tutorial001 import main as app_mod import pytest +from docs_src.tutorial.fastapi.app_testing.tutorial001 import main as app_mod +from docs_src.tutorial.fastapi.app_testing.tutorial001 import test_main_004 as test_mod + + @pytest.fixture(name="prepare", autouse=True) def prepare_fixture(clear_sqlmodel): # Trigger side effects of registering table models in SQLModel @@ -20,5 +13,6 @@ def prepare_fixture(clear_sqlmodel): importlib.reload(app_mod) importlib.reload(test_mod) + def test_tutorial(): test_mod.test_create_hero() diff --git a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests005.py b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests005.py index 3cb360a..cc550c4 100644 --- a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests005.py +++ b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests005.py @@ -1,20 +1,13 @@ import importlib -from contextlib import contextmanager -from typing import Any, Dict, List, Union -from unittest.mock import patch import pytest +from sqlmodel import Session + from docs_src.tutorial.fastapi.app_testing.tutorial001 import main as app_mod from docs_src.tutorial.fastapi.app_testing.tutorial001 import test_main_005 as test_mod from docs_src.tutorial.fastapi.app_testing.tutorial001.test_main_005 import ( session_fixture, ) -from fastapi.testclient import TestClient -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector -from sqlmodel import Session, create_engine -from sqlmodel.pool import StaticPool - assert session_fixture, "This keeps the session fixture used below" diff --git a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests006.py b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests006.py index bf69aae..67c9ac6 100644 --- a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests006.py +++ b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests006.py @@ -1,21 +1,15 @@ import importlib -from contextlib import contextmanager -from typing import Any, Dict, List, Union -from unittest.mock import patch import pytest +from fastapi.testclient import TestClient +from sqlmodel import Session + from docs_src.tutorial.fastapi.app_testing.tutorial001 import main as app_mod from docs_src.tutorial.fastapi.app_testing.tutorial001 import test_main_006 as test_mod from docs_src.tutorial.fastapi.app_testing.tutorial001.test_main_006 import ( + client_fixture, session_fixture, - client_fixture ) -from fastapi.testclient import TestClient -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector -from sqlmodel import Session, create_engine -from sqlmodel.pool import StaticPool - assert session_fixture, "This keeps the session fixture used below" assert client_fixture, "This keeps the client fixture used below" @@ -31,4 +25,3 @@ def prepare_fixture(clear_sqlmodel): def test_tutorial(prepare, session: Session, client: TestClient): test_mod.test_create_hero(client) - \ No newline at end of file diff --git a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests_main.py b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests_main.py index dec5e2e..8051c7a 100644 --- a/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests_main.py +++ b/tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests_main.py @@ -1,21 +1,17 @@ import importlib -from contextlib import contextmanager -from typing import Any, Dict, List, Union -from unittest.mock import patch import pytest -from docs_src.tutorial.fastapi.app_testing.tutorial001 import main as app_mod -from docs_src.tutorial.fastapi.app_testing.tutorial001 import test_main as test_mod -from docs_src.tutorial.fastapi.app_testing.tutorial001.test_main import ( - session_fixture, - client_fixture, -) from fastapi.testclient import TestClient from sqlalchemy import inspect from sqlalchemy.engine.reflection import Inspector from sqlmodel import Session, create_engine -from sqlmodel.pool import StaticPool +from docs_src.tutorial.fastapi.app_testing.tutorial001 import main as app_mod +from docs_src.tutorial.fastapi.app_testing.tutorial001 import test_main as test_mod +from docs_src.tutorial.fastapi.app_testing.tutorial001.test_main import ( + client_fixture, + session_fixture, +) assert session_fixture, "This keeps the session fixture used below" assert client_fixture, "This keeps the client fixture used below" diff --git a/tests/test_tutorial/test_fastapi/test_delete/test_tutorial001.py b/tests/test_tutorial/test_fastapi/test_delete/test_tutorial001.py index 4cdf7e8..e560d04 100644 --- a/tests/test_tutorial/test_fastapi/test_delete/test_tutorial001.py +++ b/tests/test_tutorial/test_fastapi/test_delete/test_tutorial001.py @@ -1,13 +1,7 @@ -from typing import Any, Dict, List, Union -from unittest.mock import patch - -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector -from sqlmodel import create_engine from fastapi.testclient import TestClient +from sqlmodel import create_engine from sqlmodel.pool import StaticPool - openapi_schema = { "openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, diff --git a/tests/test_tutorial/test_fastapi/test_limit_and_offset/test_tutorial001.py b/tests/test_tutorial/test_fastapi/test_limit_and_offset/test_tutorial001.py index 867456b..b58afdf 100644 --- a/tests/test_tutorial/test_fastapi/test_limit_and_offset/test_tutorial001.py +++ b/tests/test_tutorial/test_fastapi/test_limit_and_offset/test_tutorial001.py @@ -1,13 +1,7 @@ -from typing import Any, Dict, List, Union -from unittest.mock import patch - -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector -from sqlmodel import create_engine from fastapi.testclient import TestClient +from sqlmodel import create_engine from sqlmodel.pool import StaticPool - openapi_schema = { "openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, diff --git a/tests/test_tutorial/test_fastapi/test_multiple_models/test_tutorial001.py b/tests/test_tutorial/test_fastapi/test_multiple_models/test_tutorial001.py index 06570b7..ac85eca 100644 --- a/tests/test_tutorial/test_fastapi/test_multiple_models/test_tutorial001.py +++ b/tests/test_tutorial/test_fastapi/test_multiple_models/test_tutorial001.py @@ -1,13 +1,7 @@ -from typing import Any, Dict, List, Union -from unittest.mock import patch - -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector -from sqlmodel import create_engine from fastapi.testclient import TestClient +from sqlmodel import create_engine from sqlmodel.pool import StaticPool - openapi_schema = { "openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, diff --git a/tests/test_tutorial/test_fastapi/test_multiple_models/test_tutorial002.py b/tests/test_tutorial/test_fastapi/test_multiple_models/test_tutorial002.py index f12f6a7..421a1ca 100644 --- a/tests/test_tutorial/test_fastapi/test_multiple_models/test_tutorial002.py +++ b/tests/test_tutorial/test_fastapi/test_multiple_models/test_tutorial002.py @@ -1,13 +1,7 @@ -from typing import Any, Dict, List, Union -from unittest.mock import patch - -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector -from sqlmodel import create_engine from fastapi.testclient import TestClient +from sqlmodel import create_engine from sqlmodel.pool import StaticPool - openapi_schema = { "openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, diff --git a/tests/test_tutorial/test_fastapi/test_read_one/test_tutorial001.py b/tests/test_tutorial/test_fastapi/test_read_one/test_tutorial001.py index 0a4574d..5b3c771 100644 --- a/tests/test_tutorial/test_fastapi/test_read_one/test_tutorial001.py +++ b/tests/test_tutorial/test_fastapi/test_read_one/test_tutorial001.py @@ -1,13 +1,7 @@ -from typing import Any, Dict, List, Union -from unittest.mock import patch - -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector -from sqlmodel import create_engine from fastapi.testclient import TestClient +from sqlmodel import create_engine from sqlmodel.pool import StaticPool - openapi_schema = { "openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, diff --git a/tests/test_tutorial/test_fastapi/test_relationships/test_tutorial001.py b/tests/test_tutorial/test_fastapi/test_relationships/test_tutorial001.py index 1fceb7c..125e001 100644 --- a/tests/test_tutorial/test_fastapi/test_relationships/test_tutorial001.py +++ b/tests/test_tutorial/test_fastapi/test_relationships/test_tutorial001.py @@ -1,13 +1,7 @@ -from typing import Any, Dict, List, Union -from unittest.mock import patch - -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector -from sqlmodel import create_engine from fastapi.testclient import TestClient +from sqlmodel import create_engine from sqlmodel.pool import StaticPool - openapi_schema = { "openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, diff --git a/tests/test_tutorial/test_fastapi/test_response_model/test_tutorial001.py b/tests/test_tutorial/test_fastapi/test_response_model/test_tutorial001.py index b60f816..54fbbdc 100644 --- a/tests/test_tutorial/test_fastapi/test_response_model/test_tutorial001.py +++ b/tests/test_tutorial/test_fastapi/test_response_model/test_tutorial001.py @@ -1,13 +1,7 @@ -from typing import Any, Dict, List, Union -from unittest.mock import patch - -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector -from sqlmodel import create_engine from fastapi.testclient import TestClient +from sqlmodel import create_engine from sqlmodel.pool import StaticPool - openapi_schema = { "openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, diff --git a/tests/test_tutorial/test_fastapi/test_session_with_dependency/test_tutorial001.py b/tests/test_tutorial/test_fastapi/test_session_with_dependency/test_tutorial001.py index 3573d4f..d8dbe3f 100644 --- a/tests/test_tutorial/test_fastapi/test_session_with_dependency/test_tutorial001.py +++ b/tests/test_tutorial/test_fastapi/test_session_with_dependency/test_tutorial001.py @@ -1,13 +1,7 @@ -from typing import Any, Dict, List, Union -from unittest.mock import patch - -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector -from sqlmodel import create_engine from fastapi.testclient import TestClient +from sqlmodel import create_engine from sqlmodel.pool import StaticPool - openapi_schema = { "openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, diff --git a/tests/test_tutorial/test_fastapi/test_simple_hero_api/test_tutorial001.py b/tests/test_tutorial/test_fastapi/test_simple_hero_api/test_tutorial001.py index 02160f5..2f87faf 100644 --- a/tests/test_tutorial/test_fastapi/test_simple_hero_api/test_tutorial001.py +++ b/tests/test_tutorial/test_fastapi/test_simple_hero_api/test_tutorial001.py @@ -1,13 +1,7 @@ -from typing import Any, Dict, List, Union -from unittest.mock import patch - -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector -from sqlmodel import create_engine from fastapi.testclient import TestClient +from sqlmodel import create_engine from sqlmodel.pool import StaticPool - openapi_schema = { "openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, diff --git a/tests/test_tutorial/test_fastapi/test_teams/test_tutorial001.py b/tests/test_tutorial/test_fastapi/test_teams/test_tutorial001.py index 76e3c0d..852839b 100644 --- a/tests/test_tutorial/test_fastapi/test_teams/test_tutorial001.py +++ b/tests/test_tutorial/test_fastapi/test_teams/test_tutorial001.py @@ -1,13 +1,7 @@ -from typing import Any, Dict, List, Union -from unittest.mock import patch - -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector -from sqlmodel import create_engine from fastapi.testclient import TestClient +from sqlmodel import create_engine from sqlmodel.pool import StaticPool - openapi_schema = { "openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, @@ -537,7 +531,7 @@ def test_tutorial(clear_sqlmodel): response = client.post("/teams/", json=team_z_force) assert response.status_code == 200, response.text team_z_force_data = response.json() - team_z_force_id = team_z_force_data["id"] + team_z_force_data["id"] response = client.get("/teams/") data = response.json() assert len(data) == 2 diff --git a/tests/test_tutorial/test_fastapi/test_update/test_tutorial001.py b/tests/test_tutorial/test_fastapi/test_update/test_tutorial001.py index 9fd6ed5..e622fd3 100644 --- a/tests/test_tutorial/test_fastapi/test_update/test_tutorial001.py +++ b/tests/test_tutorial/test_fastapi/test_update/test_tutorial001.py @@ -1,13 +1,7 @@ -from typing import Any, Dict, List, Union -from unittest.mock import patch - -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector -from sqlmodel import create_engine from fastapi.testclient import TestClient +from sqlmodel import create_engine from sqlmodel.pool import StaticPool - openapi_schema = { "openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, diff --git a/tests/test_tutorial/test_insert/test_tutorial001.py b/tests/test_tutorial/test_insert/test_tutorial001.py index 4e04754..3a5162c 100644 --- a/tests/test_tutorial/test_insert/test_tutorial001.py +++ b/tests/test_tutorial/test_insert/test_tutorial001.py @@ -1,4 +1,4 @@ -from sqlmodel import create_engine, Session, select +from sqlmodel import Session, create_engine, select def test_tutorial(clear_sqlmodel): diff --git a/tests/test_tutorial/test_insert/test_tutorial002.py b/tests/test_tutorial/test_insert/test_tutorial002.py index 17834ba..c450ec0 100644 --- a/tests/test_tutorial/test_insert/test_tutorial002.py +++ b/tests/test_tutorial/test_insert/test_tutorial002.py @@ -1,4 +1,4 @@ -from sqlmodel import create_engine, Session, select +from sqlmodel import Session, create_engine, select def test_tutorial(clear_sqlmodel): diff --git a/tests/test_tutorial/test_insert/test_tutorial003.py b/tests/test_tutorial/test_insert/test_tutorial003.py index 2b6fb0b..df2112b 100644 --- a/tests/test_tutorial/test_insert/test_tutorial003.py +++ b/tests/test_tutorial/test_insert/test_tutorial003.py @@ -1,4 +1,4 @@ -from sqlmodel import create_engine, Session, select +from sqlmodel import Session, create_engine, select def test_tutorial(clear_sqlmodel): diff --git a/tests/test_tutorial/test_limit_and_offset/test_tutorial001.py b/tests/test_tutorial/test_limit_and_offset/test_tutorial001.py index 8aeb204..244f910 100644 --- a/tests/test_tutorial/test_limit_and_offset/test_tutorial001.py +++ b/tests/test_tutorial/test_limit_and_offset/test_tutorial001.py @@ -1,9 +1,8 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine -from ...conftest import get_testing_print_function +from ...conftest import get_testing_print_function expected_calls = [ [ diff --git a/tests/test_tutorial/test_limit_and_offset/test_tutorial002.py b/tests/test_tutorial/test_limit_and_offset/test_tutorial002.py index 82a615a..e9dee0c 100644 --- a/tests/test_tutorial/test_limit_and_offset/test_tutorial002.py +++ b/tests/test_tutorial/test_limit_and_offset/test_tutorial002.py @@ -1,9 +1,8 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine -from ...conftest import get_testing_print_function +from ...conftest import get_testing_print_function expected_calls = [ [ diff --git a/tests/test_tutorial/test_limit_and_offset/test_tutorial003.py b/tests/test_tutorial/test_limit_and_offset/test_tutorial003.py index ad37788..7192f7e 100644 --- a/tests/test_tutorial/test_limit_and_offset/test_tutorial003.py +++ b/tests/test_tutorial/test_limit_and_offset/test_tutorial003.py @@ -1,9 +1,8 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine -from ...conftest import get_testing_print_function +from ...conftest import get_testing_print_function expected_calls = [ [ diff --git a/tests/test_tutorial/test_limit_and_offset/test_tutorial004.py b/tests/test_tutorial/test_limit_and_offset/test_tutorial004.py index 9482f4b..448b191 100644 --- a/tests/test_tutorial/test_limit_and_offset/test_tutorial004.py +++ b/tests/test_tutorial/test_limit_and_offset/test_tutorial004.py @@ -1,9 +1,8 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine -from ...conftest import get_testing_print_function +from ...conftest import get_testing_print_function expected_calls = [ [ diff --git a/tests/test_tutorial/test_many_to_many/test_tutorial001.py b/tests/test_tutorial/test_many_to_many/test_tutorial001.py index 6bfac7f..7a3a028 100644 --- a/tests/test_tutorial/test_many_to_many/test_tutorial001.py +++ b/tests/test_tutorial/test_many_to_many/test_tutorial001.py @@ -1,10 +1,6 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector from sqlmodel import create_engine -from sqlmodel.pool import StaticPool from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_many_to_many/test_tutorial002.py b/tests/test_tutorial/test_many_to_many/test_tutorial002.py index 960e515..4c99e02 100644 --- a/tests/test_tutorial/test_many_to_many/test_tutorial002.py +++ b/tests/test_tutorial/test_many_to_many/test_tutorial002.py @@ -1,10 +1,6 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector from sqlmodel import create_engine -from sqlmodel.pool import StaticPool from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_many_to_many/test_tutorial003.py b/tests/test_tutorial/test_many_to_many/test_tutorial003.py index a6921d6..7da0d67 100644 --- a/tests/test_tutorial/test_many_to_many/test_tutorial003.py +++ b/tests/test_tutorial/test_many_to_many/test_tutorial003.py @@ -1,10 +1,6 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector from sqlmodel import create_engine -from sqlmodel.pool import StaticPool from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_one/test_tutorial001.py b/tests/test_tutorial/test_one/test_tutorial001.py index d465f22..deb133b 100644 --- a/tests/test_tutorial/test_one/test_tutorial001.py +++ b/tests/test_tutorial/test_one/test_tutorial001.py @@ -1,7 +1,7 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine + from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_one/test_tutorial002.py b/tests/test_tutorial/test_one/test_tutorial002.py index 0fb223e..7106564 100644 --- a/tests/test_tutorial/test_one/test_tutorial002.py +++ b/tests/test_tutorial/test_one/test_tutorial002.py @@ -1,7 +1,7 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine + from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_one/test_tutorial003.py b/tests/test_tutorial/test_one/test_tutorial003.py index c917f71..40a73d0 100644 --- a/tests/test_tutorial/test_one/test_tutorial003.py +++ b/tests/test_tutorial/test_one/test_tutorial003.py @@ -1,7 +1,7 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine + from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_one/test_tutorial004.py b/tests/test_tutorial/test_one/test_tutorial004.py index 4c03458..70f1868 100644 --- a/tests/test_tutorial/test_one/test_tutorial004.py +++ b/tests/test_tutorial/test_one/test_tutorial004.py @@ -1,11 +1,10 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch import pytest -from sqlalchemy.sql.expression import delete - -from sqlmodel import create_engine, Session, delete, select from sqlalchemy.exc import MultipleResultsFound +from sqlalchemy.sql.expression import delete +from sqlmodel import Session, create_engine, delete + from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_one/test_tutorial005.py b/tests/test_tutorial/test_one/test_tutorial005.py index 3a6de4d..9eb3abe 100644 --- a/tests/test_tutorial/test_one/test_tutorial005.py +++ b/tests/test_tutorial/test_one/test_tutorial005.py @@ -1,11 +1,10 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch import pytest -from sqlalchemy.sql.expression import delete - -from sqlmodel import create_engine, Session, delete, select from sqlalchemy.exc import NoResultFound +from sqlalchemy.sql.expression import delete +from sqlmodel import Session, create_engine, delete + from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_one/test_tutorial006.py b/tests/test_tutorial/test_one/test_tutorial006.py index 30f9b49..01c1af4 100644 --- a/tests/test_tutorial/test_one/test_tutorial006.py +++ b/tests/test_tutorial/test_one/test_tutorial006.py @@ -1,7 +1,7 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine + from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_one/test_tutorial007.py b/tests/test_tutorial/test_one/test_tutorial007.py index e6ccf4d..e8b984b 100644 --- a/tests/test_tutorial/test_one/test_tutorial007.py +++ b/tests/test_tutorial/test_one/test_tutorial007.py @@ -1,7 +1,7 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine + from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_one/test_tutorial008.py b/tests/test_tutorial/test_one/test_tutorial008.py index afadf9c..e0ea766 100644 --- a/tests/test_tutorial/test_one/test_tutorial008.py +++ b/tests/test_tutorial/test_one/test_tutorial008.py @@ -1,7 +1,7 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine + from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_one/test_tutorial009.py b/tests/test_tutorial/test_one/test_tutorial009.py index 4011a09..63e01fe 100644 --- a/tests/test_tutorial/test_one/test_tutorial009.py +++ b/tests/test_tutorial/test_one/test_tutorial009.py @@ -1,7 +1,7 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine + from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial001.py b/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial001.py index 663e583..30ec9fd 100644 --- a/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial001.py +++ b/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial001.py @@ -1,12 +1,8 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch -import pytest -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector -from sqlmodel import create_engine -from sqlmodel.pool import StaticPool +import pytest from sqlalchemy.exc import SAWarning +from sqlmodel import create_engine from ....conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial002.py b/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial002.py index daa9c33..98c01a9 100644 --- a/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial002.py +++ b/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial002.py @@ -1,10 +1,6 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector from sqlmodel import create_engine -from sqlmodel.pool import StaticPool from ....conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial003.py b/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial003.py index ae05d9a..2ed66f7 100644 --- a/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial003.py +++ b/tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial003.py @@ -1,12 +1,6 @@ -from typing import Any, Dict, List, Union -from unittest.mock import patch - from sqlalchemy import inspect from sqlalchemy.engine.reflection import Inspector from sqlmodel import create_engine -from sqlmodel.pool import StaticPool - -from ....conftest import get_testing_print_function def test_tutorial(clear_sqlmodel): diff --git a/tests/test_tutorial/test_relationship_attributes/test_create_and_update_relationships/test_tutorial001.py b/tests/test_tutorial/test_relationship_attributes/test_create_and_update_relationships/test_tutorial001.py index afb379e..7ced57c 100644 --- a/tests/test_tutorial/test_relationship_attributes/test_create_and_update_relationships/test_tutorial001.py +++ b/tests/test_tutorial/test_relationship_attributes/test_create_and_update_relationships/test_tutorial001.py @@ -1,10 +1,6 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector from sqlmodel import create_engine -from sqlmodel.pool import StaticPool from ....conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_relationship_attributes/test_define_relationship_attributes/test_tutorial001.py b/tests/test_tutorial/test_relationship_attributes/test_define_relationship_attributes/test_tutorial001.py index d3cd5ae..14b38ca 100644 --- a/tests/test_tutorial/test_relationship_attributes/test_define_relationship_attributes/test_tutorial001.py +++ b/tests/test_tutorial/test_relationship_attributes/test_define_relationship_attributes/test_tutorial001.py @@ -1,10 +1,6 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector from sqlmodel import create_engine -from sqlmodel.pool import StaticPool from ....conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial001.py b/tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial001.py index 96ca9ef..887c98e 100644 --- a/tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial001.py +++ b/tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial001.py @@ -1,10 +1,6 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector from sqlmodel import create_engine -from sqlmodel.pool import StaticPool from ....conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial002.py b/tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial002.py index b6d2e44..d827b1f 100644 --- a/tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial002.py +++ b/tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial002.py @@ -1,10 +1,6 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch -from sqlalchemy import inspect -from sqlalchemy.engine.reflection import Inspector from sqlmodel import create_engine -from sqlmodel.pool import StaticPool from ....conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_select/test_tutorial001_tutorial002.py b/tests/test_tutorial/test_select/test_tutorial001_tutorial002.py index aac1e91..fc8d546 100644 --- a/tests/test_tutorial/test_select/test_tutorial001_tutorial002.py +++ b/tests/test_tutorial/test_select/test_tutorial001_tutorial002.py @@ -2,6 +2,7 @@ from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine + from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_update/test_tutorial001_tutorial002.py b/tests/test_tutorial/test_update/test_tutorial001_tutorial002.py index 25458b8..be81f41 100644 --- a/tests/test_tutorial/test_update/test_tutorial001_tutorial002.py +++ b/tests/test_tutorial/test_update/test_tutorial001_tutorial002.py @@ -1,9 +1,8 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine -from ...conftest import get_testing_print_function +from ...conftest import get_testing_print_function expected_calls = [ [ diff --git a/tests/test_tutorial/test_update/test_tutorial003_tutorial004.py b/tests/test_tutorial/test_update/test_tutorial003_tutorial004.py index 3ffaac7..0f705aa 100644 --- a/tests/test_tutorial/test_update/test_tutorial003_tutorial004.py +++ b/tests/test_tutorial/test_update/test_tutorial003_tutorial004.py @@ -1,9 +1,8 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine -from ...conftest import get_testing_print_function +from ...conftest import get_testing_print_function expected_calls = [ [ diff --git a/tests/test_tutorial/test_where/test_tutorial001.py b/tests/test_tutorial/test_where/test_tutorial001.py index 63b8829..bba1326 100644 --- a/tests/test_tutorial/test_where/test_tutorial001.py +++ b/tests/test_tutorial/test_where/test_tutorial001.py @@ -1,7 +1,7 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine + from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_where/test_tutorial002.py b/tests/test_tutorial/test_where/test_tutorial002.py index 6efb682..80d60ff 100644 --- a/tests/test_tutorial/test_where/test_tutorial002.py +++ b/tests/test_tutorial/test_where/test_tutorial002.py @@ -1,7 +1,7 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine + from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_where/test_tutorial003.py b/tests/test_tutorial/test_where/test_tutorial003.py index cbba6c2..a01955e 100644 --- a/tests/test_tutorial/test_where/test_tutorial003.py +++ b/tests/test_tutorial/test_where/test_tutorial003.py @@ -1,7 +1,7 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine + from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_where/test_tutorial004.py b/tests/test_tutorial/test_where/test_tutorial004.py index a7c2add..9f4f80c 100644 --- a/tests/test_tutorial/test_where/test_tutorial004.py +++ b/tests/test_tutorial/test_where/test_tutorial004.py @@ -1,7 +1,7 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine + from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_where/test_tutorial005.py b/tests/test_tutorial/test_where/test_tutorial005.py index 4727b87..b6bfd2c 100644 --- a/tests/test_tutorial/test_where/test_tutorial005.py +++ b/tests/test_tutorial/test_where/test_tutorial005.py @@ -1,7 +1,7 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine + from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_where/test_tutorial006.py b/tests/test_tutorial/test_where/test_tutorial006.py index 0b6c1c2..e5406df 100644 --- a/tests/test_tutorial/test_where/test_tutorial006.py +++ b/tests/test_tutorial/test_where/test_tutorial006.py @@ -1,7 +1,7 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine + from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_where/test_tutorial007.py b/tests/test_tutorial/test_where/test_tutorial007.py index 5c1cb2f..878e81f 100644 --- a/tests/test_tutorial/test_where/test_tutorial007.py +++ b/tests/test_tutorial/test_where/test_tutorial007.py @@ -1,7 +1,7 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine + from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_where/test_tutorial008.py b/tests/test_tutorial/test_where/test_tutorial008.py index 8140e03..08f4c49 100644 --- a/tests/test_tutorial/test_where/test_tutorial008.py +++ b/tests/test_tutorial/test_where/test_tutorial008.py @@ -1,7 +1,7 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine + from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_where/test_tutorial009.py b/tests/test_tutorial/test_where/test_tutorial009.py index a50c78a..2583f33 100644 --- a/tests/test_tutorial/test_where/test_tutorial009.py +++ b/tests/test_tutorial/test_where/test_tutorial009.py @@ -1,7 +1,7 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine + from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_where/test_tutorial010.py b/tests/test_tutorial/test_where/test_tutorial010.py index ccf474d..71ef75d 100644 --- a/tests/test_tutorial/test_where/test_tutorial010.py +++ b/tests/test_tutorial/test_where/test_tutorial010.py @@ -1,7 +1,7 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine + from ...conftest import get_testing_print_function diff --git a/tests/test_tutorial/test_where/test_tutorial011.py b/tests/test_tutorial/test_where/test_tutorial011.py index 86ceaba..743ecd5 100644 --- a/tests/test_tutorial/test_where/test_tutorial011.py +++ b/tests/test_tutorial/test_where/test_tutorial011.py @@ -1,7 +1,7 @@ -from typing import Any, Dict, List, Union from unittest.mock import patch from sqlmodel import create_engine + from ...conftest import get_testing_print_function