Files
django-q2/django_q/tests/test_monitor.py
Ilan Steemers b113a52825 Restructured all the modules
The core module was becoming too large.
By splitting it in  cluster, monitor and tasks it becomes more manageable. It also reflects the documentation structure.
2015-07-03 15:12:11 +02:00

17 lines
354 B
Python

from django_q.cluster import Cluster
from django_q.monitor import monitor
def test_monitor():
c = Cluster()
c.start()
stats = monitor(run_once=True)
c.stop()
assert len(stats) > 0
found_c = False
for stat in stats:
if stat.cluster_id == c.pid:
found_c = True
break
assert found_c is True