mirror of
https://github.com/ansible/awx.git
synced 2026-03-02 09:18:48 -03:30
move service definition into settings
This commit is contained in:
13
awx/main/tests/unit/utils/test_reload.py
Normal file
13
awx/main/tests/unit/utils/test_reload.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# from django.conf import LazySettings
|
||||
import pytest
|
||||
|
||||
# awx.main.utils.reload
|
||||
from awx.main.main.tasks import _supervisor_service_restart, subprocess
|
||||
|
||||
|
||||
def test_produce_supervisor_command(mocker):
|
||||
with mocker.patch.object(subprocess, 'Popen'):
|
||||
_supervisor_service_restart(['beat', 'callback', 'fact'])
|
||||
subprocess.Popen.assert_called_once_with(
|
||||
['supervisorctl', 'restart', 'tower-processes:receiver', 'tower-processes:factcacher'])
|
||||
|
||||
Reference in New Issue
Block a user