'When connected, the protocol sends ``NoOp`` commands at a fixed
interval.'

def test_periodic_noops(self):

    expected_pings = 3
    reactor = Clock()
    locator = _NoOpCounter()
    peer = AMP(locator=locator)
    protocol = self.build_protocol(reactor)
    pump = connectedServerAndClient((lambda : protocol), (lambda : peer))[2]
    for _ in range(expected_pings):
        reactor.advance(PING_INTERVAL.total_seconds())
        peer.callRemote(NoOp)
        pump.flush()
    self.assertEqual(locator.noops, expected_pings)
