From 283130f971f8ed5d40da024013812fa104285690 Mon Sep 17 00:00:00 2001 From: wookie184 Date: Thu, 22 Jun 2023 12:48:25 +0000 Subject: Fix issue when running individual integration tests --- tests/gunicorn_utils.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/gunicorn_utils.py') diff --git a/tests/gunicorn_utils.py b/tests/gunicorn_utils.py index 5c077aa..15a2b58 100644 --- a/tests/gunicorn_utils.py +++ b/tests/gunicorn_utils.py @@ -33,6 +33,12 @@ def _proc_target(config_path: str, event: multiprocessing.Event, **kwargs) -> No def when_ready(_): event.set() + # Clear sys.argv to prevent Gunicorn from trying to interpret the command arguments + # used to run the test as it's own arguments. + import sys + + sys.argv = [""] + app = _StandaloneApplication(config_path, when_ready=when_ready, **kwargs) import logging -- cgit v1.2.3