diff options
Diffstat (limited to 'service/test')
-rw-r--r-- | service/test/integration/test_mark_as_read_unread.py | 11 | ||||
-rw-r--r-- | service/test/support/integration/app_test_client.py | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/service/test/integration/test_mark_as_read_unread.py b/service/test/integration/test_mark_as_read_unread.py index 6119f121..896a51d1 100644 --- a/service/test/integration/test_mark_as_read_unread.py +++ b/service/test/integration/test_mark_as_read_unread.py @@ -14,22 +14,25 @@ # You should have received a copy of the GNU Affero General Public License # along with Pixelated. If not, see <http://www.gnu.org/licenses/>. +from twisted.internet import defer + from test.support.integration import SoledadTestBase, MailBuilder from pixelated.adapter.model.status import Status class MarkAsReadUnreadTest(SoledadTestBase): + @defer.inlineCallbacks def test_mark_single_as_read(self): input_mail = MailBuilder().build_input_mail() - self.add_mail_to_inbox(input_mail) + yield self.add_mail_to_inbox(input_mail) - mails = self.get_mails_by_tag('inbox') + mails = yield self.get_mails_by_tag('inbox') self.assertNotIn('read', mails[0].status) - self.mark_many_as_read([input_mail.ident]) + yield self.mark_many_as_read([input_mail.ident]) - mails = self.get_mails_by_tag('inbox') + mails = yield self.get_mails_by_tag('inbox') self.assertIn('read', mails[0].status) def test_mark_single_as_unread(self): diff --git a/service/test/support/integration/app_test_client.py b/service/test/support/integration/app_test_client.py index e139d879..a76d4948 100644 --- a/service/test/support/integration/app_test_client.py +++ b/service/test/support/integration/app_test_client.py @@ -214,7 +214,7 @@ class AppTestClient(object): def mark_many_as_read(self, idents): res, req = self.post('/mails/read', json.dumps({'idents': idents})) - return req + return res def get_contacts(self, query): res, req = self.get('/contacts', get_args={'q': query}) |