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

Convert settings views' tests to pytest syntax #3613

Merged
merged 8 commits into from
Oct 7, 2024

Conversation

rebeccacremona
Copy link
Contributor

This PR converts all the tests for the settings views, extracted in #3607, to pytest syntax, and switches them to use pytest fixtures instead of JSON fixtures + mocks.

I don't love some of these tests, but I resisted the urge to change them too much: not the goal of this exercise 🤣.

As before, I think only a lightweight review is in order, and let it be on my head if I messed things up in the conversion: not worth anybody's time to study this.

But, a quick buzz through for code style would be appreciated. Do you see anything that offends sensibilities?

@rebeccacremona rebeccacremona requested a review from a team as a code owner October 4, 2024 22:09
@rebeccacremona rebeccacremona requested review from cmsetzer and removed request for a team October 4, 2024 22:09
Copy link
Contributor

@cmsetzer cmsetzer left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks so much for this, I'm sure it was a slog but this will set the table for lots of further test improvements.

I included a few optional stylistic suggestions; feel free to adopt or ignore them at your discretion.

perma_web/conftest.py Outdated Show resolved Hide resolved
perma_web/perma/tests/test_views_user_settings.py Outdated Show resolved Hide resolved
perma_web/perma/tests/test_views_user_settings.py Outdated Show resolved Hide resolved
Co-authored-by: cmsetzer <37311998+cmsetzer@users.noreply.github.com>
Copy link

codecov bot commented Oct 4, 2024

Codecov Report

Attention: Patch coverage is 99.18033% with 1 line in your changes missing coverage. Please review.

Project coverage is 69.73%. Comparing base (c72853c) to head (f401f93).
Report is 15 commits behind head on develop.

Files with missing lines Patch % Lines
perma_web/conftest.py 99.18% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3613      +/-   ##
===========================================
+ Coverage    69.19%   69.73%   +0.54%     
===========================================
  Files           53       54       +1     
  Lines         7193     7326     +133     
===========================================
+ Hits          4977     5109     +132     
- Misses        2216     2217       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

rebeccacremona and others added 2 commits October 7, 2024 11:02
Co-authored-by: cmsetzer <37311998+cmsetzer@users.noreply.github.com>
Co-authored-by: cmsetzer <37311998+cmsetzer@users.noreply.github.com>
@rebeccacremona rebeccacremona merged commit f4d97b3 into harvard-lil:develop Oct 7, 2024
2 checks passed
@rebeccacremona rebeccacremona deleted the settings-tests branch October 8, 2024 14:47
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.

2 participants