This commit is contained in:
Jakub Miazek
2022-09-12 13:24:15 +02:00
parent 102771aee5
commit 9b1938c450
35 changed files with 50 additions and 50 deletions

View File

@@ -1,9 +1,9 @@
from fastapi import APIRouter, Depends, status
from sqlalchemy.ext.asyncio import AsyncSession
from the_app.database import get_db
from the_app.models.nonsense import Nonsense
from the_app.schemas.nnonsense import NonsenseResponse, NonsenseSchema
from app.database import get_db
from app.models.nonsense import Nonsense
from app.schemas.nnonsense import NonsenseResponse, NonsenseSchema
router = APIRouter(prefix="/v1/nonsense")

View File

@@ -1,8 +1,8 @@
from fastapi import APIRouter, Depends, status
from sqlalchemy.ext.asyncio import AsyncSession
from the_app.database import get_db
from the_app.models.shakespeare import Paragraph
from app.database import get_db
from app.models.shakespeare import Paragraph
router = APIRouter(prefix="/v1/shakespeare")

View File

@@ -2,10 +2,10 @@ from fastapi import APIRouter, Depends, HTTPException, status
from sqlalchemy.exc import SQLAlchemyError
from sqlalchemy.ext.asyncio import AsyncSession
from the_app.database import get_db
from the_app.models.stuff import Stuff
from the_app.schemas.stuff import StuffResponse, StuffSchema
from the_app.utils import get_logger
from app.database import get_db
from app.models.stuff import Stuff
from app.schemas.stuff import StuffResponse, StuffSchema
from app.utils import get_logger
router = APIRouter(prefix="/v1/stuff")

View File

@@ -3,7 +3,7 @@ from functools import lru_cache
from pydantic import BaseSettings
from the_app.utils import get_logger
from app.utils import get_logger
logger = get_logger(__name__)

View File

@@ -5,7 +5,7 @@ from sqlalchemy.exc import SQLAlchemyError
from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine
from sqlalchemy.orm import sessionmaker
from the_app import config
from app import config
global_settings = config.get_settings()
url = global_settings.asyncpg_url

View File

@@ -1,9 +1,9 @@
from fastapi import FastAPI
from the_app.api.nonsense import router as nonsense_router
from the_app.api.stuff import router as stuff_router
from the_app.api.shakespeare import router as shakespeare_router
from the_app.utils import get_logger
from app.api.nonsense import router as nonsense_router
from app.api.stuff import router as stuff_router
from app.api.shakespeare import router as shakespeare_router
from app.utils import get_logger
logger = get_logger(__name__)

View File

@@ -1,4 +1,4 @@
# for Alembic and unit tests
from the_app.models.stuff import * # noqa
from the_app.models.nonsense import * # noqa
from the_app.models.shakespeare import * # noqa
from app.models.stuff import * # noqa
from app.models.nonsense import * # noqa
from app.models.shakespeare import * # noqa

View File

@@ -5,7 +5,7 @@ from sqlalchemy import Column, String, select
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.ext.asyncio import AsyncSession
from the_app.models.base import Base
from app.models.base import Base
class Nonsense(Base):

View File

@@ -13,7 +13,7 @@ from sqlalchemy import (
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy.orm import relationship
from the_app.models.base import Base
from app.models.base import Base
metadata = Base.metadata

View File

@@ -5,7 +5,7 @@ from sqlalchemy import Column, String, select
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.ext.asyncio import AsyncSession
from the_app.models.base import Base
from app.models.base import Base
class Stuff(Base):

View File

@@ -2,9 +2,9 @@ import pytest
import pytest_asyncio
from httpx import AsyncClient
from the_app.database import engine
from the_app.main import app
from the_app.models.base import Base
from app.database import engine
from app.main import app
from app.models.base import Base
@pytest.fixture(