def connect(self): for account in self.config['accounts']: server = nntp.server.Server(**account) try: server.connect() self.servers.append(server) except nntp.exception.BadCredentials as e: self.logger.error(e) self.servers = itertools.cycle(self.servers)
def test_connect(self): for account in self.config['accounts']: server = nntp.server.Server(**account) server.connect() server.disconnect()