diff --git a/flask_testing/utils.py b/flask_testing/utils.py index add12ef..bc6d2e2 100644 --- a/flask_testing/utils.py +++ b/flask_testing/utils.py @@ -336,6 +336,9 @@ def assert500(self, response, message=None): # Inspired by https://docs.djangoproject.com/en/dev/topics/testing/#django.test.LiveServerTestCase class LiveServerTestCase(unittest.TestCase): + + process_factory = multiprocessing.Process + def create_app(self): """ Create your Flask app here, with any @@ -375,7 +378,7 @@ def _spawn_live_server(self): worker = lambda app, port: app.run(port=port, use_reloader=False) - self._process = multiprocessing.Process( + self._process = self.process_factory( target=worker, args=(self.app, self.port) )