txfake/fake_connection.py
def patch_transport_abortConnection(transport, protocol):
    """
    Patch abortConnection() onto the transport if it doesn't already have it.
    (`Agent` assumes its transport has this.)
    """
    def abortConnection():
        protocol._fake_connection_aborted = True
        transport.loseConnection()
    patch_if_missing(transport, 'abortConnection', abortConnection)
def patch_transport_abortConnection(transport, protocol):
    """
    Patch abortConnection() onto the transport if it doesn't already have it.
    (`Agent` assumes its transport has this.)
    """
    def abortConnection():
        protocol._fake_connection_aborted = True
        transport.loseConnection()
    patch_if_missing(transport, 'abortConnection', abortConnection)
def patch_transport_abortConnection ( transport , protocol ) : def abortConnection ( ) : protocol . _fake_connection_aborted = True transport . loseConnection ( ) patch_if_missing ( transport , 'abortConnection' , abortConnection )
Patch abortConnection() onto the transport if it doesn't already have it.
    (`Agent` assumes its transport has this.)
Patch abortConnection () onto the transport if it doesn t already have it . ( Agent assumes its transport has this . )