Example #1
0
 def test_promise(self):
     fun = Mock()
     x = asynpool.promise(fun, (1,), {"foo": 1})
     x()
     self.assertTrue(x.ready)
     fun.assert_called_with(1, foo=1)
Example #2
0
 def test_promise(self):
     fun = Mock()
     x = asynpool.promise(fun, (1, ), {'foo': 1})
     x()
     assert x.ready
     fun.assert_called_with(1, foo=1)
Example #3
0
 def test_promise(self):
     fun = Mock()
     x = asynpool.promise(fun, (1,), {'foo': 1})
     x()
     assert x.ready
     fun.assert_called_with(1, foo=1)