def test_stopServiceWaitingAndStarting(self):
        self.setUpState('waiting')

        # Stop the service.
        self.monitor.stopService()

        # Start the service before the initial reconnect delay expires
        self.clock.advance(DELAY_INITIAL - 1)
        self.monitor.startService()
        self.clock.advance(0)
        self.assertEqual(2, len(self.api.filterCalls))

        # After the initial reconnect delay, don't connect again!
        self.clock.advance(1)
        self.assertEqual(2, len(self.api.filterCalls), 'Extra connect')
Stopping and starting service while waiting, should cause 1 connect.
dataset/ETHPy150Open dustin/twitty-twister/twittytwister/test/test_twitter.py/TwitterMonitorTest.test_stopServiceWaitingAndStarting