Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion flask_testing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
)

Expand Down