Browse Source

Tests passing

Ask Solem 13 years ago
parent
commit
603d0b7487
1 changed files with 4 additions and 8 deletions
  1. 4 8
      celery/tests/concurrency/test_processes.py

+ 4 - 8
celery/tests/concurrency/test_processes.py

@@ -161,14 +161,10 @@ class test_TaskPool(Case):
         pool.apply_async(lambda x: x, (2, ), {})
 
     def test_terminate_job(self):
-
-        @patch('celery.concurrency.processes._kill')
-        def _do_test(_kill):
-            pool = TaskPool(10)
-            pool.terminate_job(1341)
-            _kill.assert_called_with(1341, signal.SIGTERM)
-
-        _do_test()
+        pool = TaskPool(10)
+        pool._pool = Mock()
+        pool.terminate_job(1341)
+        pool._pool.terminate_job.assert_called_with(1341, None)
 
     def test_grow_shrink(self):
         pool = TaskPool(10)