simple test for monitor

This commit is contained in:
Ilan Steemers
2015-06-25 13:22:16 +02:00
parent 67b41d42b0
commit 99a44dda45
6 changed files with 85 additions and 65 deletions
+11
View File
@@ -0,0 +1,11 @@
from django_q.core import Cluster
from django_q.management.commands.qmonitor import monitor
def test_monitor():
c = Cluster()
c.start()
stats = monitor(run_once=True)
c.stop()
assert len(stats) > 0
assert stats[0].cluster_id == c.pid