summaryrefslogtreecommitdiff
path: root/mail/src/leap
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
commitd0efcb209f07545d9fc3177a78354065167d54e3 (patch)
tree82c192ea9637aaf4e12de336937138663a996cb7 /mail/src/leap
parent8f8677782b83cdca95b27a07792d889538321b9b (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 'mail/src/leap')
-rw-r--r--mail/src/leap/mail/imap/tests/test_imap_store_fetch.py75
1 files changed, 0 insertions, 75 deletions
diff --git a/mail/src/leap/mail/imap/tests/test_imap_store_fetch.py b/mail/src/leap/mail/imap/tests/test_imap_store_fetch.py
deleted file mode 100644
index a71ff456..00000000
--- a/mail/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)