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 tests to use fixtures #18

Merged
merged 18 commits into from
Aug 24, 2023
Merged

Refactor tests to use fixtures #18

merged 18 commits into from
Aug 24, 2023

Conversation

fivegrant
Copy link
Collaborator

What this PR does

The WET tests are taken and made DRY by using fixtures. This is done by

  1. Moving repeated logic into conftest.py
  2. Merging all unit tests into a single file
  3. Creating resource directories for each test

In the future, the basic tests for each operation can be easily refactored so we can evaluate over input.

What this PR does NOT do

  1. Test live
  2. Test qualitatively

Additionally, I think the current assertions are not super strong as tests. Better assertions are needed.

@codecov
Copy link

codecov bot commented Aug 24, 2023

Codecov Report

Merging #18 (64c216a) into main (2c32c25) will increase coverage by 1.84%.
Report is 3 commits behind head on main.
The diff coverage is 97.87%.

@@            Coverage Diff             @@
##             main      #18      +/-   ##
==========================================
+ Coverage   81.78%   83.62%   +1.84%     
==========================================
  Files           5        6       +1     
  Lines         505      519      +14     
==========================================
+ Hits          413      434      +21     
+ Misses         92       85       -7     
Files Changed Coverage Δ
api/utils.py 79.03% <85.71%> (+4.42%) ⬆️
api/server.py 95.45% <100.00%> (+4.68%) ⬆️
lib/settings.py 100.00% <100.00%> (ø)
worker/operations.py 75.21% <100.00%> (ø)
worker/utils.py 91.22% <100.00%> (ø)

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

@brandomr brandomr merged commit cf17636 into main Aug 24, 2023
5 checks passed
@brandomr brandomr deleted the fg/fixtures branch August 24, 2023 18:28
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