Skip to content

Commit da3c40d

Browse files
committed
Fix test error introduced by ballot refactor (test didn't set up
ballot position properly). - Legacy-Id: 4405
1 parent 88d083f commit da3c40d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

ietf/submit/tests.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
from ietf.person.models import Person, Email
1515
from ietf.group.models import Group, Role
16-
from ietf.doc.models import Document, BallotPositionDocEvent
16+
from ietf.doc.models import Document, BallotDocEvent, BallotPositionDocEvent
1717
from ietf.submit.models import IdSubmissionDetail
1818

1919
class SubmitTestCase(django.test.TestCase):
@@ -159,6 +159,7 @@ def test_submit_existing(self):
159159

160160
# make a discuss to see if the AD gets an email
161161
ballot_position = BallotPositionDocEvent()
162+
ballot_position.ballot = draft.latest_event(BallotDocEvent, type="created_ballot")
162163
ballot_position.pos_id = "discuss"
163164
ballot_position.type = "changed_ballot_position"
164165
ballot_position.doc = draft
@@ -229,7 +230,7 @@ def test_submit_existing(self):
229230
self.assertTrue(name in unicode(outbox[-2]))
230231
self.assertTrue("mars" in unicode(outbox[-2]))
231232
self.assertTrue(draft.ad.role_email("ad").address in unicode(outbox[-2]))
232-
self.assertTrue(ballot_position.ad.email_address() in unicode(outbox[-2]))
233+
self.assertTrue(ballot_position.ad.role_email("ad").address in unicode(outbox[-2]))
233234
self.assertTrue("New Version Notification" in outbox[-1]["Subject"])
234235
self.assertTrue(name in unicode(outbox[-1]))
235236
self.assertTrue("mars" in unicode(outbox[-1]))

0 commit comments

Comments
 (0)