adds --info summary to monitor command

This commit is contained in:
Ilan
2015-08-09 19:29:24 +02:00
parent dea61a87e3
commit 79393dee16
4 changed files with 78 additions and 14 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ from django.core.management import call_command
def test_qcluster():
call_command('qcluster', run_once=True)
@pytest.mark.django_db
def test_qmonitor():
call_command('qmonitor', run_once=True)
call_command('qmonitor', info=True)
+11 -1
View File
@@ -1,5 +1,8 @@
import pytest
import redis
from django_q.cluster import Cluster
from django_q.monitor import monitor, Stat
from django_q.monitor import monitor, Stat, info, ping_redis
def test_monitor():
@@ -17,3 +20,10 @@ def test_monitor():
assert stat.empty_queues() is True
break
assert found_c is True
@pytest.mark.django_db
def test_ping_redis():
r = redis.StrictRedis(port=6388)
with pytest.raises(Exception):
ping_redis(r)