SHARE
TWEET

Untitled

a guest Aug 22nd, 2012 145 Never
  1. from nose.tools import eq_
  2. from celery import Celery
  3. from celery.task.http import HttpDispatchTask
  4.  
  5. celery = Celery()
  6.  
  7. def test_http_dispatch():
  8.     celery.conf.CELERY_ALWAYS_EAGER = True
  9.     res = HttpDispatchTask.delay(url='http://echo.jsontest.com/status/success/retval/see', method='POST').get()
  10.     eq_(res, "see")
RAW Paste Data
Top