server/tests: show SQL queries only with -v
This commit is contained in:
parent
29b57b0af0
commit
4530b6e3b8
|
@ -51,6 +51,7 @@ def query_counter():
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def query_logger():
|
def query_logger():
|
||||||
|
if pytest.config.option.verbose > 0:
|
||||||
import logging
|
import logging
|
||||||
logging.basicConfig()
|
logging.basicConfig()
|
||||||
logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO)
|
logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO)
|
||||||
|
|
Loading…
Reference in New Issue