def testUpdatePeerList(self):
    self.client.UpdatePeerList(self.new_peers)
    self.assertEquals(self.client._peers, self.new_peers)
    req = confd.client.ConfdClientRequest(type=constants.CONFD_REQ_PING)
    self.client.SendRequest(req)
    self.assertEquals(self.client._socket.send_count, len(self.new_peers))
    self.assert_(self.client._socket.last_address in self.new_peers)
dataset/ETHPy150Open ganeti/ganeti/test/py/ganeti.confd.client_unittest.py/_BaseClientTest.testUpdatePeerList/original