Skip to content

Commit 2cfb81f

Browse files
committed
Changed instances of email body extaction to use a custom get_payload() function.
- Legacy-Id: 16454
1 parent 99a7f9c commit 2cfb81f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

ietf/doc/tests_ballot.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright The IETF Trust 2013-2019, All Rights Reserved
22
# -*- coding: utf-8 -*-
33

4+
45
import datetime
56
from pyquery import PyQuery
67

@@ -20,7 +21,7 @@
2021
from ietf.person.models import Person, PersonalApiKey
2122
from ietf.person.factories import PersonFactory
2223
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
2425
from ietf.utils.text import unwrap
2526

2627

@@ -171,7 +172,7 @@ def test_api_set_position(self):
171172
self.assertEqual(len(outbox), mailbox_before + 1)
172173
m = outbox[-1]
173174
self.assertIn('COMMENT', m['Subject'])
174-
self.assertIn('New comment', m.get_payload())
175+
self.assertIn('New comment', get_payload(m))
175176

176177

177178
def test_edit_position_as_secretary(self):
@@ -790,7 +791,7 @@ def test_make_last_call(self):
790791
self.assertTrue("ietf-announce@" in outbox[-2]['To'])
791792
for prefix in ['draft-ietf-mars-test','mars-chairs','aread']:
792793
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]))
794795

795796
self.assertTrue("Last Call" in outbox[-1]['Subject'])
796797
self.assertTrue("drafts-lastcall@icann.org" in outbox[-1]['To'])

0 commit comments

Comments
 (0)