odapi/tests/__init__.py

11 lines
317 B
Python
Raw Normal View History

2020-08-02 19:46:56 +02:00
from fastapi.testclient import TestClient
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from app import app
from constants import TESTING_DB
engine = create_engine(TESTING_DB)
2020-08-02 19:46:56 +02:00
TestingSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
client = TestClient(app)