|
1 | 1 | # Copyright The IETF Trust 2013-2019, All Rights Reserved |
2 | 2 | # -*- coding: utf-8 -*- |
3 | 3 |
|
| 4 | + |
4 | 5 | import datetime |
5 | 6 | from pyquery import PyQuery |
6 | 7 |
|
|
20 | 21 | from ietf.person.models import Person, PersonalApiKey |
21 | 22 | from ietf.person.factories import PersonFactory |
22 | 23 | from ietf.utils.test_utils import TestCase, login_testing_unauthorized |
23 | | -from ietf.utils.mail import outbox, empty_outbox |
| 24 | +from ietf.utils.mail import outbox, empty_outbox, get_payload |
24 | 25 | from ietf.utils.text import unwrap |
25 | 26 |
|
26 | 27 |
|
@@ -171,7 +172,7 @@ def test_api_set_position(self): |
171 | 172 | self.assertEqual(len(outbox), mailbox_before + 1) |
172 | 173 | m = outbox[-1] |
173 | 174 | self.assertIn('COMMENT', m['Subject']) |
174 | | - self.assertIn('New comment', m.get_payload()) |
| 175 | + self.assertIn('New comment', get_payload(m)) |
175 | 176 |
|
176 | 177 |
|
177 | 178 | def test_edit_position_as_secretary(self): |
@@ -790,7 +791,7 @@ def test_make_last_call(self): |
790 | 791 | self.assertTrue("ietf-announce@" in outbox[-2]['To']) |
791 | 792 | for prefix in ['draft-ietf-mars-test','mars-chairs','aread']: |
792 | 793 | self.assertTrue(prefix+"@" in outbox[-2]['Cc']) |
793 | | - self.assertIn("The following IPR Declarations",outbox[-2].get_payload()) |
| 794 | + self.assertIn("The following IPR Declarations", get_payload(outbox[-2])) |
794 | 795 |
|
795 | 796 | self.assertTrue("Last Call" in outbox[-1]['Subject']) |
796 | 797 | self.assertTrue("drafts-lastcall@icann.org" in outbox[-1]['To']) |
|
0 commit comments