'Calling stopTrying on a L{ReconnectingClientFactory} doesn\'t attempt a
retry on any active connector.'

def test_stopTryingDoesNotReconnect(self):

    class FactoryAwareFakeConnector(FakeConnector, ):
        attemptedRetry = False
        def stopConnecting(self):
            '\n                                                                Behave    as    though    an    ongoing    connection    attempt    has    now\n                                                                failed,    and    notify    the    factory    of    this.\n                                                                '
            f.clientConnectionFailed(self, None)
        def connect(self):
            '\n                                                                Record    an    attempt    to    reconnect,    since    this    is    what    we\n                                                                are    trying    to    avoid.\n                                                                '
            self.attemptedRetry = True
    f = ReconnectingClientFactory()
    f.clock = Clock()
    f.connector = FactoryAwareFakeConnector()
    f.stopTrying()
    self.assertFalse(f.connector.attemptedRetry)
    self.assertFalse(f.clock.getDelayedCalls())
