summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Ordoquy <xordoquy@linovia.com>2013-12-05 21:49:00 +0100
committerXavier Ordoquy <xordoquy@linovia.com>2013-12-05 21:49:00 +0100
commit8c4ff3e910adfcaffc8ef39eeaecc7654437e6db (patch)
tree1441f3bc54a05066652676015c0bbf373030d36b
parente81b5b39c297ab718fb941fe83b8b10d57622e8c (diff)
parenta3a68a772a82caf6fae598a934c74339ad041196 (diff)
downloadraven-8c4ff3e910adfcaffc8ef39eeaecc7654437e6db.tar.gz
Merge remote-tracking branch 'dctrwatson/cel-tests' into fix_celery_3_1_x
-rw-r--r--tests/contrib/celery/tests.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/contrib/celery/tests.py b/tests/contrib/celery/tests.py
index 8efc882..1666c2f 100644
--- a/tests/contrib/celery/tests.py
+++ b/tests/contrib/celery/tests.py
@@ -1,6 +1,9 @@
# -*- coding: utf-8 -*-
import mock
+
+from celery.app import app_or_default
+
from raven.utils.testutils import TestCase
from raven.contrib.celery import CeleryClient
@@ -25,13 +28,17 @@ class ClientTest(TestCase):
self.assertEquals(send_raw.delay.call_count, 1)
- # @with_eager_tasks
@mock.patch('raven.base.Client.send_encoded')
def test_with_eager(self, send_encoded):
"""
Integration test to ensure it propagates all the way down
and calls the parent client's send_encoded method.
"""
+ celery_app = app_or_default()
+ celery_app.conf.CELERY_ALWAYS_EAGER = True
+
self.client.captureMessage(message='test')
self.assertEquals(send_encoded.call_count, 1)
+
+ celery_app.conf.CELERY_ALWAYS_EAGER = False