Example #1
0
 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)
Example #2
0
 def test_connect(self):
     for account in self.config['accounts']:
         server = nntp.server.Server(**account)
         server.connect()
         server.disconnect()