summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap
diff options
context:
space:
mode:
authorBruno Wagner <bwgpro@gmail.com>2015-08-04 12:48:56 -0300
committerBruno Wagner <bwgpro@gmail.com>2015-08-04 12:48:56 -0300
commit570bf35249b1271a9453d5970059e080f2947d17 (patch)
tree997f9a1d35d7f2aee9b8a67efd298510ed77ed84 /src/leap/mail/imap
parent4777ad0d3ec5378de8b0c7ffbcecf2e19ad9c180 (diff)
[tests] Removed outdated test
This test was not updated for a while and it doesn't make sense in this context, when we create acceptance tests we can make sure we cover this feature The issue for acceptance tests is: https://leap.se/code/issues/7341
Diffstat (limited to 'src/leap/mail/imap')
-rw-r--r--src/leap/mail/imap/tests/test_imap_store_fetch.py75
1 files changed, 0 insertions, 75 deletions
diff --git a/src/leap/mail/imap/tests/test_imap_store_fetch.py b/src/leap/mail/imap/tests/test_imap_store_fetch.py
deleted file mode 100644
index a71ff45..0000000
--- a/src/leap/mail/imap/tests/test_imap_store_fetch.py
+++ /dev/null
@@ -1,75 +0,0 @@
-from twisted.protocols import loopback
-from twisted.python import util
-
-from leap.mail.imap.tests.utils import IMAP4HelperMixin
-
-TEST_USER = "testuser@leap.se"
-TEST_PASSWD = "1234"
-
-
-class StoreAndFetchTestCase(IMAP4HelperMixin):
- """
- Several tests to check that the internal storage representation
- is able to render the message structures as we expect them.
- """
-
- def setUp(self):
- self.received_messages = self.received_uid = None
- self.result = None
- return IMAP4HelperMixin.setUp(self)
-
- def addListener(self, x):
- pass
-
- def removeListener(self, x):
- pass
-
- def _addSignedMessage(self, _):
- self.server.state = 'select'
- infile = util.sibpath(__file__, 'rfc822.multi-signed.message')
- raw = open(infile).read()
- MBOX_NAME = "multipart/SIGNED"
-
- self.server.theAccount.addMailbox(MBOX_NAME)
- mbox = self.server.theAccount.getMailbox(MBOX_NAME)
- self.server.mbox = mbox
- # return a deferred that will fire with UID
- return self.server.mbox.messages.add_msg(raw)
-
- def _fetchWork(self, uids):
-
- def result(R):
- self.result = R
-
- self.connected.addCallback(
- self._addSignedMessage).addCallback(
- lambda uid: self.function(
- uids, uid=uid
- ) # do NOT use seq numbers!
- ).addCallback(
- result
- ).addCallback(
- self._cbStopClient
- ).addErrback(self._ebGeneral)
-
- d = loopback.loopbackTCP(self.server, self.client, noisy=False)
- d.addCallback(lambda x: self.assertEqual(self.result, self.expected))
- return d
-
- def testMultiBody(self):
- """
- Test that a multipart signed message is retrieved the same
- as we stored it.
- """
- self.function = self.client.fetchBody
- messages = '1'
-
- # XXX review. This probably should give everything?
-
- self.expected = {1: {
- 'RFC822.TEXT': 'This is an example of a signed message,\n'
- 'with attachments.\n\n\n--=20\n'
- 'Nihil sine chao! =E2=88=B4\n',
- 'UID': '1'}}
- # print "test multi: fetch uid", messages
- return self._fetchWork(messages)