Example #1
0
 def test_call_soon(self, promise):
     callback = Mock(name='callback')
     ret = self.hub.call_soon(callback, 1, 2, 3)
     promise.assert_called_with(callback, (1, 2, 3))
     assert promise() in self.hub._ready
     assert ret is promise()
Example #2
0
 def test_call_soon(self, promise):
     callback = Mock(name='callback')
     ret = self.hub.call_soon(callback, 1, 2, 3)
     promise.assert_called_with(callback, (1, 2, 3))
     assert promise() in self.hub._ready
     assert ret is promise()
 def test_call_soon(self, promise):
     callback = Mock(name='callback')
     ret = self.hub.call_soon(callback, 1, 2, 3)
     promise.assert_called_with(callback, (1, 2, 3))
     self.assertIn(promise(), self.hub._ready)
     self.assertIs(ret, promise())