Set start method only once.

This commit is contained in:
Antoine Nguyen
2026-01-15 16:37:14 +01:00
parent e026dae2f2
commit 8351b43757
+2 -1
View File
@@ -21,6 +21,8 @@ from modoboa.policyd import core as policyd_core
from . import constants
multiprocessing.set_start_method("fork")
def start_policy_daemon():
call_command("policy_daemon")
@@ -52,7 +54,6 @@ class PolicyDaemonTestCase(RedisTestCaseMixin, ParametersMixin, TransactionTestC
db.connections.close_all()
self.send_mock = AsyncMock(send)
multiprocessing.set_start_method("fork")
self.process = Process(target=start_policy_daemon)
self.process.daemon = True
self.process.start()