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

Increase Test Coverage #251

Merged
merged 6 commits into from
Aug 16, 2021
Merged

Increase Test Coverage #251

merged 6 commits into from
Aug 16, 2021

Conversation

MRichards99
Copy link
Collaborator

@MRichards99 MRichards99 commented Aug 13, 2021

This PR will close #250

Description

After learning how to do test mocking, just thought I'd try and increase test coverage where there's easy wins to do so. Like I've done before, I've kind've left the DB backend coverage alone as the backend specific tests might be able to be combined through #213 in the future.

Testing Instructions

No functionality change, just make sure you're happy with the new tests :)

  • Review code
  • Check GitHub Actions build
  • If icatdb Generator Script Consistency Test CI job fails, is this because of a
    deliberate change made to the script to change generated data (which isn't
    actually a problem) or is there an underlying issue with the changes made?
  • Review changes to test coverage

Agile Board Tracking

Connect to #250

@codecov
Copy link

codecov bot commented Aug 13, 2021

Codecov Report

Merging #251 (9e0977d) into master (1130f4e) will increase coverage by 0.55%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #251      +/-   ##
==========================================
+ Coverage   90.55%   91.10%   +0.55%     
==========================================
  Files          31       31              
  Lines        2361     2361              
  Branches      205      205              
==========================================
+ Hits         2138     2151      +13     
+ Misses        194      186       -8     
+ Partials       29       24       -5     
Impacted Files Coverage Δ
datagateway_api/common/icat/filters.py 99.33% <0.00%> (+1.32%) ⬆️
datagateway_api/common/icat/helpers.py 94.57% <0.00%> (+1.80%) ⬆️
datagateway_api/common/query_filter_factory.py 100.00% <0.00%> (+6.45%) ⬆️
datagateway_api/common/icat/icat_client_pool.py 100.00% <0.00%> (+7.69%) ⬆️
...tagateway_api/src/resources/entities/entity_map.py 95.65% <0.00%> (+8.69%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1130f4e...9e0977d. Read the comment docs.

@MRichards99 MRichards99 merged commit 87fbbeb into master Aug 16, 2021
@MRichards99 MRichards99 deleted the increase-test-coverage branch August 16, 2021 12:09
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.

Increase Test Coverage, mainly Mocking
2 participants