示例#1
0
 def setUp(self):
     TestCaseWithTestDB.setUp(self)
     self.conductor = self.get_conductor()
     self._listenServer()
     self.old_backoffs = (raindrop.proto.smtp.SMTPAccount.def_retry_count,
                          raindrop.proto.smtp.SMTPAccount.def_retry_backoff,
                          raindrop.proto.smtp.SMTPAccount.def_retry_backoff_max,
                         )
     raindrop.proto.smtp.SMTPAccount.def_retry_count = 1
     raindrop.proto.smtp.SMTPAccount.def_retry_backoff = 0.01
     raindrop.proto.smtp.SMTPAccount.def_retry_backoff_max = 0.01
示例#2
0
    def tearDown(self):
        self.serverPort.stopListening()
        return TestCaseWithTestDB.tearDown(self)

        # hrmph - aborted attempts to wait for the server...        
        d = defer.maybeDeferred(self.serverPort.stopListening)
        return defer.gatherResults([d, self.serverDisconnected])
示例#3
0
 def make_config(self):
     config = TestCaseWithTestDB.make_config(self)
     # now add our smtp account
     acct = config.accounts['test_smtp'] = {}
     acct['proto'] = 'smtp'
     acct['username'] = '******'
     acct['id'] = 'smtp_test'
     return config
示例#4
0
 def make_config(self):
     config = TestCaseWithTestDB.make_config(self)
     # now add our twitter account
     acct = config.accounts['test_twitter'] = {}
     acct['id'] = 'twitter'
     acct['proto'] = 'twitter'
     acct['username'] = '******'
     return config
示例#5
0
 def make_config(self):
     config = TestCaseWithTestDB.make_config(self)
     # now clobber it with a fake imap account which has our test user.
     config.accounts.clear()
     acct = config.accounts['test'] = {}
     acct['proto'] = 'imap'
     acct['id'] = 'imap_test'
     acct['username'] = self.my_addy
     return config
示例#6
0
 def make_config(self):
     config = TestCaseWithTestDB.make_config(self)
     # now clobber it with out smtp account
     config.accounts = {}
     acct = config.accounts['test'] = {}
     acct['proto'] = 'smtp'
     acct['username'] = '******'
     acct['id'] = 'smtp_test'
     acct['host'] = SMTP_SERVER_HOST
     acct['port'] = SMTP_SERVER_PORT
     acct['ssl'] = False
     return config
示例#7
0
    def tearDown(self):
        self.server.shutdown()
        self.server_thread.join(5)
        if self.server_thread.isAlive():
            self.fail("test server didn't stop")
        self.server.server_close()
        (raindrop.proto.smtp.SMTPAccount.def_retry_count,
         raindrop.proto.smtp.SMTPAccount.def_retry_backoff,
         raindrop.proto.smtp.SMTPAccount.def_retry_backoff_max,
                            ) = self.old_backoffs

        return TestCaseWithTestDB.tearDown(self)
示例#8
0
 def make_config(self):
     config = TestCaseWithTestDB.make_config(self)
     # now clobber it with our imap account
     config.accounts.clear()
     acct = config.accounts['test'] = {}
     acct['proto'] = 'imap'
     acct['username'] = self.imap_server._username
     acct['password'] = self.imap_server._password
     acct['id'] = 'imap_test'
     acct['host'] = IMAP_SERVER_HOST
     acct['port'] = IMAP_SERVER_PORT
     acct['ssl'] = False
     return config
示例#9
0
 def setUp(self):
     _ = yield TestCaseWithTestDB.setUp(self)
     self.serverDisconnected = defer.Deferred()
     self.serverPort = self._listenServer(self.serverDisconnected)
示例#10
0
 def get_options(self):
     ret = TestCaseWithTestDB.get_options(self)
     ret.exts = self.simple_extensions
     ret.no_process = self.use_backlog_processor
     ret.protocols = ['test']
     return ret
示例#11
0
 def get_options(self):
     ret = TestCaseWithTestDB.get_options(self)
     ret.exts = ['rd.test.core.test_converter']
     return ret
示例#12
0
 def get_options(self):
     ret = TestCaseWithTestDB.get_options(self)
     ret.exts = self.simple_extensions
     ret.protocols = ['test']
     return ret
示例#13
0
 def setUp(self):
     TestCaseWithTestDB.setUp(self)
     # and reset our API so it reloads anything
     self.call_api("_reset")