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

Block network requests during unit tests #119

Merged

Conversation

duckontheweb
Copy link
Collaborator

@duckontheweb duckontheweb commented Nov 11, 2021

Related Issue(s):

None

Description:

While working on #118 I noticed that one of the tests in test_item_search.py was taking a while and discovered that it was not using VCR.py/pytest-recording to record the responses. This PR adds the --block-network option to all test commands to ensure that an exception is raised whenever a network request is made and adds the @pytest.mark.vcr decorator to the offending test.

PR Checklist:

  • Code is formatted
  • Tests pass
  • Changes are added to the CHANGELOG

@codecov-commenter
Copy link

codecov-commenter commented Nov 11, 2021

Codecov Report

Merging #119 (ff63605) into main (9e010ad) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #119   +/-   ##
=======================================
  Coverage   78.71%   78.71%           
=======================================
  Files           9        9           
  Lines         545      545           
=======================================
  Hits          429      429           
  Misses        116      116           

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 9e010ad...ff63605. Read the comment docs.

@matthewhanson matthewhanson merged commit 17d3909 into stac-utils:main Nov 17, 2021
@duckontheweb duckontheweb deleted the fix/network-request-during-test branch November 23, 2021 01:59
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.

4 participants