Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create control share validation #511

Merged
merged 1 commit into from
Aug 23, 2023
Merged

Conversation

vinikvuo
Copy link
Contributor

No description provided.

@vinikvuo vinikvuo self-assigned this Aug 15, 2023
@vinikvuo vinikvuo force-pushed the feature-controshare-validation branch 4 times, most recently from f996032 to 511bfd1 Compare August 15, 2023 11:41
@codecov-commenter
Copy link

codecov-commenter commented Aug 15, 2023

Codecov Report

Merging #511 (511bfd1) into develop (f58532c) will increase coverage by 0.03%.
Report is 1 commits behind head on develop.
The diff coverage is 100.00%.

❗ Current head 511bfd1 differs from pull request most recent head ce14d83. Consider uploading reports for the commit ce14d83 to get more accurate results

@@             Coverage Diff             @@
##           develop     #511      +/-   ##
===========================================
+ Coverage    75.68%   75.72%   +0.03%     
===========================================
  Files          439      438       -1     
  Lines        23095    23127      +32     
  Branches      2314     2321       +7     
===========================================
+ Hits         17480    17512      +32     
- Misses        5178     5179       +1     
+ Partials       437      436       -1     
Files Changed Coverage Δ
forms/tests/test_api.py 100.00% <ø> (ø)
conftest.py 100.00% <100.00%> (ø)
forms/serializers/form.py 84.96% <100.00%> (ø)
forms/tests/test_serializers.py 91.66% <100.00%> (+1.76%) ⬆️
forms/validators/answer.py 100.00% <100.00%> (ø)

... and 7 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

]["hallintaosuus"] = {"value": "1/3", "extraValue": ""}
answer_serializer = AnswerSerializer(data=answer_data)

# test that a incorrectly formatted ssn is caught by the validator
Copy link
Contributor

@PasiVuohijoki PasiVuohijoki Aug 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment is copypasted from previous test. Maybe something like "test that control share validator returns validation error if the sum is not 1"

if round(result, 10) != 1:
raise ValidationError(code="control share is not even")

def control_share_finder_generator(self, entries):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooo, nice generator function :D

Copy link
Contributor

@PasiVuohijoki PasiVuohijoki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One little slip with the copypasted comment, otherwise good!

@vinikvuo vinikvuo force-pushed the feature-controshare-validation branch from 511bfd1 to ce14d83 Compare August 23, 2023 08:26
@vinikvuo vinikvuo merged commit fc137fe into develop Aug 23, 2023
2 checks passed
@vinikvuo vinikvuo deleted the feature-controshare-validation branch August 23, 2023 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants