From 6904acf34524b84d70d0054a5bb953a1bf9c784a Mon Sep 17 00:00:00 2001 From: Duda Dornelles Date: Tue, 3 Feb 2015 09:14:10 -0200 Subject: Enabling integration tests to be run in parallel If we were using twisted 12.3.0, this change would allow us to run the tests with 'trial -j '. In a simple test in my box the integration test suite got 3x faster --- service/test/integration/test_contacts.py | 3 --- service/test/integration/test_delete_mail.py | 6 ------ service/test/integration/test_drafts.py | 6 ------ service/test/integration/test_mark_as_read_unread.py | 6 ------ service/test/integration/test_retrieve_attachment.py | 6 ------ service/test/integration/test_search.py | 3 --- service/test/integration/test_soledad_querier.py | 3 --- service/test/integration/test_tags.py | 6 ------ 8 files changed, 39 deletions(-) (limited to 'service/test/integration') diff --git a/service/test/integration/test_contacts.py b/service/test/integration/test_contacts.py index 1a471440..4974c471 100644 --- a/service/test/integration/test_contacts.py +++ b/service/test/integration/test_contacts.py @@ -18,9 +18,6 @@ from test.support.integration import SoledadTestBase, MailBuilder class ContactsTest(SoledadTestBase): - def setUp(self): - SoledadTestBase.setUp(self) - def test_TO_CC_and_BCC_fields_are_being_searched(self): input_mail = MailBuilder().with_tags(['important']).build_input_mail() self.client.add_mail_to_inbox(input_mail) diff --git a/service/test/integration/test_delete_mail.py b/service/test/integration/test_delete_mail.py index 5a3a97fb..91dc0e9e 100644 --- a/service/test/integration/test_delete_mail.py +++ b/service/test/integration/test_delete_mail.py @@ -19,12 +19,6 @@ from test.support.integration import * class DeleteMailTest(SoledadTestBase): - def setUp(self): - SoledadTestBase.setUp(self) - - def tearDown(self): - SoledadTestBase.tearDown(self) - def test_move_mail_to_trash_when_deleting(self): input_mail = MailBuilder().with_subject('Mail with tags').build_input_mail() self.client.add_mail_to_inbox(input_mail) diff --git a/service/test/integration/test_drafts.py b/service/test/integration/test_drafts.py index d4fde099..c555cb89 100644 --- a/service/test/integration/test_drafts.py +++ b/service/test/integration/test_drafts.py @@ -19,12 +19,6 @@ from test.support.integration import * class DraftsTest(SoledadTestBase): - def setUp(self): - SoledadTestBase.setUp(self) - - def tearDown(self): - SoledadTestBase.tearDown(self) - def test_post_sends_mail_and_deletes_previous_draft_if_it_exists(self): # creates one draft first_draft = MailBuilder().with_subject('First draft').build_json() diff --git a/service/test/integration/test_mark_as_read_unread.py b/service/test/integration/test_mark_as_read_unread.py index 86a48e62..cc09acec 100644 --- a/service/test/integration/test_mark_as_read_unread.py +++ b/service/test/integration/test_mark_as_read_unread.py @@ -20,12 +20,6 @@ from pixelated.adapter.model.status import Status class MarkAsReadUnreadTest(SoledadTestBase): - def setUp(self): - SoledadTestBase.setUp(self) - - def tearDown(self): - SoledadTestBase.tearDown(self) - def test_mark_single_as_read(self): input_mail = MailBuilder().build_input_mail() self.client.add_mail_to_inbox(input_mail) diff --git a/service/test/integration/test_retrieve_attachment.py b/service/test/integration/test_retrieve_attachment.py index d6ad9298..c81b684a 100644 --- a/service/test/integration/test_retrieve_attachment.py +++ b/service/test/integration/test_retrieve_attachment.py @@ -19,12 +19,6 @@ from test.support.integration.soledad_test_base import SoledadTestBase class RetrieveAttachmentTest(SoledadTestBase): - def setUp(self): - SoledadTestBase.setUp(self) - - def tearDown(self): - SoledadTestBase.tearDown(self) - def test_attachment_content_is_retrieved(self): ident = 'F4E99C1CEC4D300A4223A96CCABBE0304BDBC31C550A5A03E207A5E4C3C71A22' attachment_dict = {'content-disposition': 'attachment', diff --git a/service/test/integration/test_search.py b/service/test/integration/test_search.py index 1fb22a38..68a808dd 100644 --- a/service/test/integration/test_search.py +++ b/service/test/integration/test_search.py @@ -19,9 +19,6 @@ from test.support.integration import * class SearchTest(SoledadTestBase): - def setUp(self): - SoledadTestBase.setUp(self) - def test_that_tags_returns_all_tags(self): input_mail = MailBuilder().with_tags(['important']).build_input_mail() self.client.add_mail_to_inbox(input_mail) diff --git a/service/test/integration/test_soledad_querier.py b/service/test/integration/test_soledad_querier.py index f8767630..9c7f8a81 100644 --- a/service/test/integration/test_soledad_querier.py +++ b/service/test/integration/test_soledad_querier.py @@ -29,9 +29,6 @@ class SoledadQuerierTest(SoledadTestBase, WithMsgFields): self.maxDiff = None self.soledad_querier = self.client.soledad_querier - def tearDown(self): - SoledadTestBase.tearDown(self) - def _get_empty_mailbox(self): return copy.deepcopy(self.EMPTY_MBOX) diff --git a/service/test/integration/test_tags.py b/service/test/integration/test_tags.py index 0efcbb6b..1de6d3fa 100644 --- a/service/test/integration/test_tags.py +++ b/service/test/integration/test_tags.py @@ -21,12 +21,6 @@ from pixelated.adapter.services.tag_service import TagService class TagsTest(SoledadTestBase): - def setUp(self): - SoledadTestBase.setUp(self) - - def tearDown(self): - SoledadTestBase.tearDown(self) - def _tags_json(self, tags): return json.dumps({'newtags': tags}) -- cgit v1.2.3