move service definition into settings

This commit is contained in:
AlanCoding
2017-02-15 12:07:30 -05:00
parent d8f133d175
commit 186b672e4f
4 changed files with 63 additions and 17 deletions

View 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'])