Skip to content

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

Merged
rjsparks merged 1 commit into
ietf-tools:mainfrom
painless-security:jennifer/changed-email-test
Dec 19, 2022
Merged

test: fix (and simplify) changed email address generation#4919
rjsparks merged 1 commit into
ietf-tools:mainfrom
painless-security:jennifer/changed-email-test

Conversation

@jennifer-richards

Copy link
Copy Markdown
Member

This is a better fix than #4918. The generate-and-check loop with the EmailFactory was nonsense. The loop checked whether two Email instances were the same which would never be true (aside from the initial test before the factory was called). The condition should have tested equality of Email.address, but that is the primary key for the model/table so was guaranteed to be different unless the factory had caused a primary key collision.

This just specifies a changed email address and gets rid of the loop and randomness.

@codecov

codecov Bot commented Dec 19, 2022

Copy link
Copy Markdown

Codecov Report

Merging #4919 (3b0de30) into main (bc1cba1) will decrease coverage by 0.00%.
The diff coverage is 83.72%.

@@            Coverage Diff             @@
##             main    #4919      +/-   ##
==========================================
- Coverage   88.47%   88.46%   -0.01%     
==========================================
  Files         296      296              
  Lines       39795    39806      +11     
==========================================
+ Hits        35208    35214       +6     
- Misses       4587     4592       +5     
Impacted Files Coverage Δ
ietf/review/utils.py 89.57% <ø> (-0.03%) ⬇️
ietf/doc/utils.py 88.05% <77.77%> (-0.16%) ⬇️
ietf/doc/views_doc.py 91.18% <84.37%> (+0.40%) ⬆️
ietf/doc/models.py 88.16% <100.00%> (+0.01%) ⬆️
ietf/doc/templatetags/ballot_icon.py 84.82% <100.00%> (ø)
ietf/doc/views_search.py 88.81% <0.00%> (-0.83%) ⬇️
ietf/utils/draft.py 71.44% <0.00%> (-0.31%) ⬇️
ietf/nomcom/utils.py 91.30% <0.00%> (-0.25%) ⬇️
ietf/person/utils.py 86.98% <0.00%> (+0.59%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@rjsparks rjsparks merged commit a8780dc into ietf-tools:main Dec 19, 2022
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 23, 2022
@jennifer-richards jennifer-richards deleted the jennifer/changed-email-test branch January 12, 2023 21:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants