diff options
Diffstat (limited to 'test/python/server_test_case.py')
| -rw-r--r-- | test/python/server_test_case.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/python/server_test_case.py b/test/python/server_test_case.py index 0025c4b..ec243a2 100644 --- a/test/python/server_test_case.py +++ b/test/python/server_test_case.py @@ -26,11 +26,17 @@ def wait_for_port(host, port, timeout=10): class ServerTestCase(unittest.TestCase): - """Spawns the genenetwork4 binary for the duration of the test class.""" + """Spawns the genenetwork4 binary for the duration of the test class. + + Subclasses that need the server started with extra/overridden + environment variables (e.g. GENENETWORK4_DEV_MODE) can set EXTRA_ENV. + """ + + EXTRA_ENV = {} @classmethod def setUpClass(cls): - env = dict(os.environ, GENENETWORK4_PORT=PORT) + env = dict(os.environ, GENENETWORK4_PORT=PORT, **cls.EXTRA_ENV) cls.proc = subprocess.Popen([BINARY], env=env) if not wait_for_port(HOST, PORT): cls.proc.terminate() |
