def test_stopConnectingWhileConnecting(self):
"""
When the L{IConnector} is told to C{stopConnecting} while another
attempt is still in flight, it cancels that connection.
"""
self.connector.stopConnecting()
self.assertEqual(len(self.factory.fails), 1)
self.assertTrue(self.factory.fails[0].reason.check(CancelledError))
评论列表
文章目录