def test_function_taskset(self): with eager_tasks(self.app): subtasks = [return_True_task.s(i) for i in range(1, 6)] ts = TaskSet(subtasks) res = ts.apply_async() self.assertListEqual(res.join(), [True, True, True, True, True])
def test_URL_post_async(self): with eager_tasks(): with mock_urlopen(success_response(100)): d = http.URL('http://example.com/mul').post_async(x=10, y=10) self.assertEqual(d.get(), 100)
def test_URL_post_async(self): with eager_tasks(self.app): with mock_urlopen(success_response(100)): d = http.URL('http://example.com/mul').post_async(x=10, y=10) self.assertEqual(d.get(), 100)