disable some checks if testing
This commit is contained in:
parent
d302596d73
commit
c8bf2c2071
2 changed files with 7 additions and 3 deletions
|
@ -78,7 +78,10 @@ class DateTimeAction(Action):
|
|||
code_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
|
||||
def common_pre():
|
||||
def common_pre(nochecks=False):
|
||||
if nochecks:
|
||||
prechecks = []
|
||||
else:
|
||||
prechecks = [pre_check_user, pre_check_permissions, pre_check_ffmpeg]
|
||||
configs = ["default_config.py"]
|
||||
if "TECHREC_CONFIG" in os.environ:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import logging
|
||||
import time
|
||||
import os
|
||||
|
@ -20,7 +21,7 @@ from .forge import create_mp3, Validator
|
|||
|
||||
logger = logging.getLogger("server")
|
||||
|
||||
common_pre()
|
||||
common_pre(nochecks=('pytest' in sys.argv[0]))
|
||||
app = FastAPI()
|
||||
db = None
|
||||
|
||||
|
|
Loading…
Reference in a new issue