1
1
# coding: utf-8
2
2
from django import VERSION
3
- from django .core .management import call_command
3
+ from django .core .management import execute_from_command_line
4
4
5
5
from ._compat import patch
6
6
@@ -14,17 +14,18 @@ def test_celeryd_command():
14
14
else :
15
15
traceback = None
16
16
with patch (CELERYD_COMMAND ) as handle :
17
- call_command ('celeryd' )
17
+ execute_from_command_line (['manage.py' , 'celeryd' , '--hostname=test' ,
18
+ '--loglevel=info' ])
18
19
handle .assert_called_with (
19
20
autoreload = None , autoscale = None , beat = None , broker = None ,
20
21
concurrency = 0 , detach = None , exclude_queues = [], executable = None ,
21
- gid = None , heartbeat_interval = None , hostname = None , include = [],
22
- logfile = None , loglevel = 'WARN ' , max_tasks_per_child = None ,
22
+ gid = None , heartbeat_interval = None , hostname = "test" , include = [],
23
+ logfile = None , loglevel = 'info ' , max_tasks_per_child = None ,
23
24
no_color = False , no_execv = False , optimization = None , pidfile = None ,
24
25
pool_cls = 'prefork' , purge = False , pythonpath = None , queues = [],
25
26
quiet = None , schedule_filename = 'celerybeat-schedule' ,
26
27
scheduler_cls = None , send_events = False , settings = None ,
27
- skip_checks = True , state_db = None , task_soft_time_limit = None ,
28
+ state_db = None , task_soft_time_limit = None ,
28
29
task_time_limit = None , traceback = traceback , uid = None , umask = None ,
29
30
verbosity = 1 , without_gossip = False , without_heartbeat = False ,
30
31
without_mingle = False , working_directory = None
0 commit comments