Best practice of testing django-rq ( python-rq ) in Django -


i'll start using django-rq in project.

django integration rq, redis based python queuing library.

what best practice of testing django apps using rq?

for example, if want test app black box, after user makes actions want execute jobs in current queue, , check results in db. how can in django-tests?

i found django-rq, allows spin worker in test environment executes tasks on queue , quits.

from django.test impor testcase django_rq import get_worker  class mytest(testcase):     def test_something_that_creates_jobs(self):         ...                      # stuff init jobs.         get_worker().work(burst=true)  # processes jobs stop.         ...                      # asserts job stuff done. 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c++ - Using OpenSSL in a multi-threaded application -

All overlapping substrings matching a java regex -