* added a synchronous cluster simulation

* added a test for the sync function

* moved signing into its own module

* refactored imports to solve circular import problems stemming from the task module pretending to be a cluster

* added documentation for the new sync option
This commit is contained in:
Ilan Steemers
2015-07-09 20:16:21 +02:00
parent 31dbd29b36
commit e62fd1ee70
7 changed files with 124 additions and 56 deletions
+4
View File
@@ -32,6 +32,10 @@ def r():
def test_redis_connection(r):
assert r.ping() is True
@pytest.mark.django_db
def test_sync(r):
task = async('django_q.tests.tasks.count_letters', DEFAULT_WORDLIST, redis=r, sync=True)
assert result(task) == 1506
@pytest.mark.django_db
def test_cluster_initial(r):