summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap/tests/__init__.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-04-15 16:22:39 +0900
committerKali Kaneko <kali@leap.se>2013-05-17 03:31:57 +0900
commit33289c373e4fdbb506b8486c73e5ff1a7837882f (patch)
treef648b86e8fab406cec81fb61d373d03944072f36 /src/leap/mail/imap/tests/__init__.py
parent8fb5895c46282aa913d2cf3c31f3c526174b3f3b (diff)
Functional SoledadBackedAccount and LeapMailboxes
The imap service is launched from the tac file, and still needs some information to be provided in separate config files that stub much of the initialization parameters. working fetch and store methods. tested with offlineimap and thunderbird. several mailboxes might be broken.
Diffstat (limited to 'src/leap/mail/imap/tests/__init__.py')
-rw-r--r--src/leap/mail/imap/tests/__init__.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/leap/mail/imap/tests/__init__.py b/src/leap/mail/imap/tests/__init__.py
index 9a4c663..315d649 100644
--- a/src/leap/mail/imap/tests/__init__.py
+++ b/src/leap/mail/imap/tests/__init__.py
@@ -48,18 +48,19 @@ class BaseSoledadIMAPTest(BaseLeapTest):
document_factory=LeapDocument)
self._db2 = u1db.open(self.db2_file, create=True,
document_factory=LeapDocument)
+
# initialize soledad by hand so we can control keys
self._soledad = Soledad(self.email, gnupg_home=self.gnupg_home,
- initialize=False,
+ bootstrap=False,
prefix=self.tempdir)
self._soledad._init_dirs()
self._soledad._gpg = GPGWrapper(gnupghome=self.gnupg_home)
- self._soledad._gpg.import_keys(PUBLIC_KEY)
- self._soledad._gpg.import_keys(PRIVATE_KEY)
- self._soledad._load_openpgp_keypair()
- if not self._soledad._has_secret():
- self._soledad._gen_secret()
- self._soledad._load_secret()
+
+ if not self._soledad._has_privkey():
+ self._soledad._set_privkey(PRIVATE_KEY)
+ if not self._soledad._has_symkey():
+ self._soledad._gen_symkey()
+ self._soledad._load_symkey()
self._soledad._init_db()
def tearDown(self):