diff options
Diffstat (limited to 'src/leap/mx/tests/tester.py')
-rw-r--r-- | src/leap/mx/tests/tester.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/leap/mx/tests/tester.py b/src/leap/mx/tests/tester.py index 05d2d05..8ca0987 100644 --- a/src/leap/mx/tests/tester.py +++ b/src/leap/mx/tests/tester.py @@ -2,10 +2,11 @@ import ConfigParser import sys import os -from twisted.internet import reactor, defer +from twisted.internet import reactor from twisted.python import filepath, log from leap.mx import couchdbhelper +from leap.mx import soledadhelper from leap.mx.mail_receiver import MailReceiver if __name__ == "__main__": @@ -30,6 +31,10 @@ if __name__ == "__main__": dbName="identities", username=user, password=password) + incoming_api = False + if config.has_section("incoming api"): + args = (config.get(option) for option in ["host", "port", "token"]) + incoming_api = soledadhelper.SoledadIncomingAPI(*args) # Mail receiver mail_couch_url_prefix = "http://%s:%s@%s:%s" % (user, @@ -37,7 +42,7 @@ if __name__ == "__main__": server, port) - mr = MailReceiver(mail_couch_url_prefix, cdb, []) + mr = MailReceiver(mail_couch_url_prefix, cdb, [], incoming_api) fpath = filepath.FilePath(fullpath) d = mr._process_incoming_email(None, fpath, 0) |