test: fix (and simplify) changed email address generation (#4919)

This commit is contained in:
Jennifer Richards 2022-12-19 15:33:51 -04:00 committed by GitHub
parent 4b1c10f6ab
commit a8780dc439
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1305,9 +1305,8 @@ Man Expires September 22, 2015 [Page 3]
basis=change_reason
)
old_email = new_email = draft.authors()[0].email()
while new_email == old_email:
new_email = EmailFactory(person=draft.authors()[0])
old_address = draft.authors()[0].email()
new_email = EmailFactory(person=draft.authors()[0], address=f'changed-{old_address}')
post_data['author-0-email'] = new_email.address
post_data['author-1-affiliation'] = 'University of Nowhere'
post_data['author-2-country'] = 'Chile'