From 23503fcdf83fe1437bcd164c79d75cf56c08bade Mon Sep 17 00:00:00 2001 From: Lisa Junger Date: Tue, 14 Oct 2014 14:29:36 +0200 Subject: Issue #12 - Bulk mark as unread --- service/test/integration/mark_as_read_unread_test.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'service/test/integration') diff --git a/service/test/integration/mark_as_read_unread_test.py b/service/test/integration/mark_as_read_unread_test.py index a75e8c92..cdac78d5 100644 --- a/service/test/integration/mark_as_read_unread_test.py +++ b/service/test/integration/mark_as_read_unread_test.py @@ -30,21 +30,33 @@ class MarkAsReadTest(unittest.TestCase, SoledadTestBase): self.add_mail_to_inbox(input_mail) mails = self.get_mails_by_tag('inbox') - self.assertFalse('read' in mails[0].status) + self.assertNotIn('read', mails[0].status) self.mark_as_read(input_mail.ident) mails = self.get_mails_by_tag('inbox') - self.assertTrue('read' in mails[0].status) + self.assertIn('read', mails[0].status) def test_mark_single_as_unread(self): input_mail = MailBuilder().with_status('read').build_input_mail() + self.add_mail_to_inbox(input_mail) + self.mark_as_unread(input_mail.ident) + mails = self.get_mails_by_tag('inbox') - self.assertIn('read', mails[0].status) + self.assertNotIn('read', mails[0].status) - self.mark_as_unread(input_mail.ident) + def test_mark_many_mails_as_unread(self): + input_mail = MailBuilder().with_status('read').build_input_mail() + input_mail2 = MailBuilder().with_status('read').build_input_mail() + + self.add_mail_to_inbox(input_mail) + self.add_mail_to_inbox(input_mail2) + + self.mark_many_as_unread([input_mail.ident, input_mail2.ident]) mails = self.get_mails_by_tag('inbox') + self.assertNotIn('read', mails[0].status) + self.assertNotIn('read', mails[1].status) -- cgit v1.2.3