From 63b8dee422c196f9993435f53417df23828e054f Mon Sep 17 00:00:00 2001 From: Bruno Wagner Date: Thu, 10 Sep 2015 16:16:20 -0300 Subject: Removed bounced email contact removal (#441) This feature was never working anyway. Anybody could remove addresses from anyones adressbook by sending a bounce and then the receiver was not able to send an email to that address anymore. Nice dos :) --- service/test/integration/test_contacts.py | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'service/test') diff --git a/service/test/integration/test_contacts.py b/service/test/integration/test_contacts.py index 148f614c..4a0957a8 100644 --- a/service/test/integration/test_contacts.py +++ b/service/test/integration/test_contacts.py @@ -74,33 +74,3 @@ class ContactsTest(SoledadTestBase): self.assertTrue('Recipient Principal ' in contacts) self.assertTrue('Recipient Copied ' in contacts) self.assertTrue('Recipient Carbon ' in contacts) - - @defer.inlineCallbacks - def test_bounced_addresses_are_ignored(self): - self.skipTest("bounced mails filter still needs to be migrated") - to_be_bounced = MailBuilder().with_to('this_mail_was_bounced@domain.com').build_input_mail() - yield self.add_mail_to_inbox(to_be_bounced) - - bounced_hdoc = self._bounced_mail_hdoc_content() - bounced_mail_template = MailBuilder().build_input_mail() - bounced_mail_template.headers.update(bounced_hdoc["headers"]) - # TODO: must add attachments to bounced_mail_template - yield self.add_mail_to_inbox(bounced_mail_template) - - not_bounced_mail = MailBuilder( - ).with_tags(['important']).with_to('this_mail_was_not@bounced.com').build_input_mail() - yield self.add_mail_to_inbox(not_bounced_mail) - - mails = yield self.mail_service.all_mails() - self.search_engine.index_mails(mails) - contacts = yield self.get_contacts(query='this') - - self.assertNotIn('this_mail_was_bounced@domain.com', contacts) - self.assertNotIn("MAILER-DAEMON@domain.org (Mail Delivery System)", contacts) - self.assertIn('this_mail_was_not@bounced.com', contacts) - - def _bounced_mail_hdoc_content(self): - hdoc_file = pkg_resources.resource_filename('test.unit.fixtures', 'bounced_mail_hdoc.json') - with open(hdoc_file) as f: - hdoc = json.loads(f.read()) - return hdoc -- cgit v1.2.3