server/tests: add sql logging
This commit is contained in:
parent
025dff62dd
commit
3bf9d6b462
1 changed files with 3 additions and 0 deletions
|
@ -6,6 +6,9 @@ from szurubooru.util import misc
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def session():
|
def session():
|
||||||
|
import logging
|
||||||
|
logging.basicConfig()
|
||||||
|
logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO)
|
||||||
engine = sqlalchemy.create_engine('sqlite:///:memory:')
|
engine = sqlalchemy.create_engine('sqlite:///:memory:')
|
||||||
session_maker = sqlalchemy.orm.sessionmaker(bind=engine)
|
session_maker = sqlalchemy.orm.sessionmaker(bind=engine)
|
||||||
session_instance = sqlalchemy.orm.scoped_session(session_maker)
|
session_instance = sqlalchemy.orm.scoped_session(session_maker)
|
||||||
|
|
Loading…
Reference in a new issue