This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Aug 22nd, 2012  |  syntax: Python  |  size: 0.32 KB  |  views: 86  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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")
clone this paste RAW Paste Data