mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-07 05:18:12 +08:00
Expanding coverage
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
from django_q.cluster import Cluster
|
||||
from django_q.monitor import monitor
|
||||
from django_q.monitor import monitor, Stat
|
||||
|
||||
|
||||
def test_monitor():
|
||||
assert Stat.get(0).sentinel == 0
|
||||
c = Cluster()
|
||||
c.start()
|
||||
stats = monitor(run_once=True)
|
||||
@@ -12,5 +13,7 @@ def test_monitor():
|
||||
for stat in stats:
|
||||
if stat.cluster_id == c.pid:
|
||||
found_c = True
|
||||
assert stat.uptime() > 0
|
||||
assert stat.empty_queues() is True
|
||||
break
|
||||
assert found_c is True
|
||||
|
||||
Reference in New Issue
Block a user