'When a TCP DNS protocol associated with a Resolver disconnects, it is
removed from the Resolver\'s connection list.'

def test_tcpDisconnectRemovesFromConnections(self):

    resolver = client.Resolver(servers=[('example.com', 53)])
    protocol = resolver.factory.buildProtocol(None)
    protocol.makeConnection(None)
    self.assertIn(protocol, resolver.connections)
    protocol.connectionLost(None)
    self.assertNotIn(protocol, resolver.connections)
