summaryrefslogtreecommitdiff
path: root/service/test/integration/test_incoming_mail.py
diff options
context:
space:
mode:
Diffstat (limited to 'service/test/integration/test_incoming_mail.py')
-rw-r--r--service/test/integration/test_incoming_mail.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/service/test/integration/test_incoming_mail.py b/service/test/integration/test_incoming_mail.py
index e413d6c1..62d7b97e 100644
--- a/service/test/integration/test_incoming_mail.py
+++ b/service/test/integration/test_incoming_mail.py
@@ -25,17 +25,21 @@ class IncomingMailTest(SoledadTestBase):
@defer.inlineCallbacks
def test_message_collection(self):
# given
- mail_collection = yield self.account.get_collection_by_mailbox('INBOX')
+ mail_collection = yield self.app_test_client.account.get_collection_by_mailbox('INBOX')
input_mail = MailBuilder().build_input_mail()
# when
- yield MailboxIndexerListener.listen(self.account, 'INBOX', self.mail_store, self.search_engine)
+ yield MailboxIndexerListener.listen(
+ self.app_test_client.account,
+ 'INBOX',
+ self.app_test_client.mail_store,
+ self.app_test_client.search_engine)
yield mail_collection.add_msg(input_mail.raw)
# then
yield self.wait_in_reactor() # event handlers are called async, wait for it
- mails, mail_count = self.search_engine.search('in:all')
+ mails, mail_count = self.app_test_client.search_engine.search('in:all')
self.assertEqual(1, mail_count)
self.assertEqual(1, len(mails))