diff --git a/techrec/cli.py b/techrec/cli.py index 49dc81d..bb231c1 100644 --- a/techrec/cli.py +++ b/techrec/cli.py @@ -78,8 +78,11 @@ class DateTimeAction(Action): code_dir = os.path.dirname(os.path.realpath(__file__)) -def common_pre(): - prechecks = [pre_check_user, pre_check_permissions, pre_check_ffmpeg] +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: for conf in os.environ["TECHREC_CONFIG"].split(":"): diff --git a/techrec/server.py b/techrec/server.py index f0b14ab..7218b8c 100644 --- a/techrec/server.py +++ b/techrec/server.py @@ -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