瀏覽代碼

Tests passing

Ask Solem 12 年之前
父節點
當前提交
ac9ab98ad5
共有 2 個文件被更改,包括 10 次插入6 次删除
  1. 7 6
      celery/tests/concurrency/test_gevent.py
  2. 3 0
      celery/tests/worker/test_worker.py

+ 7 - 6
celery/tests/concurrency/test_gevent.py

@@ -112,9 +112,10 @@ class test_TasKPool(Case):
 class test_Timer(Case):
 
     def test_timer(self):
-        x = Timer()
-        x.ensure_started()
-        x.schedule = Mock()
-        x.start()
-        x.stop()
-        x.schedule.clear.assert_called_with()
+        with mock_module(*gevent_modules):
+            x = Timer()
+            x.ensure_started()
+            x.schedule = Mock()
+            x.start()
+            x.stop()
+            x.schedule.clear.assert_called_with()

+ 3 - 0
celery/tests/worker/test_worker.py

@@ -634,6 +634,9 @@ class test_Consumer(Case):
             def channel(self):
                 return Mock()
 
+            def as_uri(self):
+                return 'dummy://'
+
             def drain_events(self, **kwargs):
                 if not self.calls:
                     self.calls += 1