summaryrefslogtreecommitdiff
path: root/src/leap/mail/adaptors/tests
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-01-12 20:47:29 -0400
committerKali Kaneko <kali@leap.se>2015-02-11 14:05:43 -0400
commitf7030295a936cc5da33f50411b5ff60ae0eec7cc (patch)
tree43bc7699b79185729ac62860374ee43a19f917d9 /src/leap/mail/adaptors/tests
parent9e2cf40db51889ec43cd4e27b55c7f14e0436c01 (diff)
Use mailbox uuids
The previous implementation is naive, since it imposes a burden when renaming mailboxes. We're using uuids in the local uid tables instead, which is more cryptic but way more efficient. * receive mbox uuid instead of name * use mailbox uuid in identifiers
Diffstat (limited to 'src/leap/mail/adaptors/tests')
-rw-r--r--src/leap/mail/adaptors/tests/test_soledad_adaptor.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/leap/mail/adaptors/tests/test_soledad_adaptor.py b/src/leap/mail/adaptors/tests/test_soledad_adaptor.py
index 0cca5ef..7bdeef5 100644
--- a/src/leap/mail/adaptors/tests/test_soledad_adaptor.py
+++ b/src/leap/mail/adaptors/tests/test_soledad_adaptor.py
@@ -21,7 +21,6 @@ import os
from functools import partial
from twisted.internet import defer
-from twisted.trial import unittest
from leap.mail.adaptors import models
from leap.mail.adaptors.soledad import SoledadDocumentWrapper
@@ -62,7 +61,7 @@ class TestAdaptor(SoledadIndexMixin):
'by-type': ['type']}
-class SoledadDocWrapperTestCase(unittest.TestCase, SoledadTestMixin):
+class SoledadDocWrapperTestCase(SoledadTestMixin):
"""
Tests for the SoledadDocumentWrapper.
"""
@@ -284,7 +283,7 @@ class TestMessageClass(object):
return self.wrapper
-class SoledadMailAdaptorTestCase(unittest.TestCase, SoledadTestMixin):
+class SoledadMailAdaptorTestCase(SoledadTestMixin):
"""
Tests for the SoledadMailAdaptor.
"""
@@ -337,7 +336,7 @@ class SoledadMailAdaptorTestCase(unittest.TestCase, SoledadTestMixin):
hdoc="H-deadbeef",
cdocs=["C-deadabad"])
fdoc = dict(
- mbox="Foobox",
+ mbox_uuid="Foobox",
flags=('\Seen', '\Nice'),
tags=('Personal', 'TODO'),
seen=False, deleted=False,
@@ -355,7 +354,7 @@ class SoledadMailAdaptorTestCase(unittest.TestCase, SoledadTestMixin):
('\Seen', '\Nice'))
self.assertEqual(msg.wrapper.fdoc.tags,
('Personal', 'TODO'))
- self.assertEqual(msg.wrapper.fdoc.mbox, "Foobox")
+ self.assertEqual(msg.wrapper.fdoc.mbox_uuid, "Foobox")
self.assertEqual(msg.wrapper.hdoc.multi, False)
self.assertEqual(msg.wrapper.hdoc.subject,
"Test Msg")
@@ -363,7 +362,7 @@ class SoledadMailAdaptorTestCase(unittest.TestCase, SoledadTestMixin):
"This is a test message")
def test_get_msg_from_metamsg_doc_id(self):
- # XXX complete-me!
+ # TODO complete-me!
self.fail()
def test_create_msg(self):