Skip to content

Commit a5e5bb1

Browse files
committed
Expanded one of the nomcom tests a bit, and updated a fixture to match the current /nomcom/default/email/feedback_receipt.txt template.
- Legacy-Id: 14223
1 parent 042ca21 commit a5e5bb1

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

ietf/dbtemplate/fixtures/nomcom_templates.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,7 @@ $comments: Comments on this candidate</field>
146146
<field to="name.dbtemplatetypename" name="type" rel="ManyToOneRel">plain</field>
147147
<field type="TextField" name="content">Hi,
148148

149-
Your input regarding $nominee for the position of
150-
$position has been received and registered.
149+
Your input regarding $about has been received and registered.
151150

152151
The following comments have been registered:
153152

ietf/nomcom/tests.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,13 +780,17 @@ def add_questionnaire(self, *args, **kwargs):
780780

781781
def test_public_feedback(self):
782782
login_testing_unauthorized(self, COMMUNITY_USER, self.public_feedback_url)
783+
position = "IAOC"
783784

784785
empty_outbox()
785-
self.feedback_view(public=True,confirmation=True)
786+
self.feedback_view(public=True, confirmation=True, position=position)
786787
# feedback_view does a nomination internally: there is a lot of email related to that - tested elsewhere
787788
# We're interested in the confirmation receipt here
788789
self.assertEqual(len(outbox),3)
789790
self.assertEqual('NomCom comment confirmation', outbox[2]['Subject'])
791+
email_body = outbox[2].get_payload()
792+
self.assertIn(position, email_body)
793+
self.assertNotIn('$', email_body)
790794
self.assertEqual(self.email_from, outbox[-2]['From'])
791795
self.assertIn('plain', outbox[2]['To'])
792796
self.assertIn(u'Comments with accents äöå', unicode(outbox[2].get_payload(decode=True),"utf-8","replace"))

0 commit comments

Comments
 (0)