mirror of
https://github.com/PaiGramTeam/sqlmodel.git
synced 2025-01-30 23:21:05 +00:00
🎨 Format tests, sort and remove unused imports
This commit is contained in:
parent
843ba7f281
commit
eb8c496e10
@ -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"
|
||||
|
@ -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"]
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
from pathlib import Path
|
||||
|
||||
from sqlalchemy import inspect
|
||||
from sqlalchemy.engine.reflection import Inspector
|
||||
from sqlmodel import create_engine
|
||||
|
@ -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 = [
|
||||
[
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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"
|
||||
|
@ -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"},
|
||||
|
@ -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"},
|
||||
|
@ -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"},
|
||||
|
@ -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"},
|
||||
|
@ -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"},
|
||||
|
@ -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"},
|
||||
|
@ -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"},
|
||||
|
@ -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"},
|
||||
|
@ -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"},
|
||||
|
@ -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
|
||||
|
@ -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"},
|
||||
|
@ -1,4 +1,4 @@
|
||||
from sqlmodel import create_engine, Session, select
|
||||
from sqlmodel import Session, create_engine, select
|
||||
|
||||
|
||||
def test_tutorial(clear_sqlmodel):
|
||||
|
@ -1,4 +1,4 @@
|
||||
from sqlmodel import create_engine, Session, select
|
||||
from sqlmodel import Session, create_engine, select
|
||||
|
||||
|
||||
def test_tutorial(clear_sqlmodel):
|
||||
|
@ -1,4 +1,4 @@
|
||||
from sqlmodel import create_engine, Session, select
|
||||
from sqlmodel import Session, create_engine, select
|
||||
|
||||
|
||||
def test_tutorial(clear_sqlmodel):
|
||||
|
@ -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 = [
|
||||
[
|
||||
|
@ -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 = [
|
||||
[
|
||||
|
@ -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 = [
|
||||
[
|
||||
|
@ -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 = [
|
||||
[
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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 = [
|
||||
[
|
||||
|
@ -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 = [
|
||||
[
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user