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

Refactor test_capture_job.py #3415

Merged
merged 6 commits into from
Oct 26, 2023

Conversation

rebeccacremona
Copy link
Contributor

@rebeccacremona rebeccacremona commented Oct 26, 2023

See ENG-415.

This PR refactors test_capture_job.py:

a) to use pytest fixtures powered by factory boy instead of our json fixtures

b) to use standard pytest syntax instead of the older unittest-style syntax

This was easy, because I basically already went through this exercise in harvard-lil/perma-capture@b2fe7ad and related commits, when building the prototype capture service.

I hope to be able to reuse a lot of that work (as intended), as this refactoring project proceeds!

Reviewing

The unified diff is very hard to read, but I think if you click through the individual commits, you'll be able to easily see at a glance that the tests haven't been changed.

@rebeccacremona rebeccacremona requested a review from a team as a code owner October 26, 2023 21:30
@rebeccacremona rebeccacremona requested review from kilbergr and bensteinberg and removed request for a team and kilbergr October 26, 2023 21:30
@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c4527d4) 68.62% compared to head (ee508f6) 68.89%.
Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3415      +/-   ##
===========================================
+ Coverage    68.62%   68.89%   +0.26%     
===========================================
  Files           53       53              
  Lines         7236     7297      +61     
===========================================
+ Hits          4966     5027      +61     
  Misses        2270     2270              
Files Coverage Δ
perma_web/conftest.py 90.90% <100.00%> (+7.81%) ⬆️

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

Copy link
Contributor

@matteocargnelutti matteocargnelutti left a comment

Choose a reason for hiding this comment

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

🎸

@rebeccacremona rebeccacremona removed the request for review from bensteinberg October 26, 2023 22:13
@rebeccacremona rebeccacremona merged commit 2d8ec0d into harvard-lil:develop Oct 26, 2023
2 checks passed
@rebeccacremona rebeccacremona deleted the test-refactor-1 branch October 30, 2023 18:43
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