Skip to content

Commit

Permalink
Merge pull request #697 from ecalifornica/remove-test-network-calls-http
Browse files Browse the repository at this point in the history
Remove test HTTP network calls
  • Loading branch information
reece authored Sep 18, 2023
2 parents 34a4c88 + 48b3cdc commit c69e03f
Show file tree
Hide file tree
Showing 37 changed files with 5,988 additions and 2 deletions.
15 changes: 14 additions & 1 deletion docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,25 @@ A Quick Contribution Example
* Code, code, code!

You probably want to test code with::
.. spacer
* Test, test, test

You can run the tests using make::

$ make test

See `Local UTA`_ and `make`_ for tips on accellerating testing.

If your tests make network calls you can capture those calls
with vcrpy and the pytest-recording plugin::

$ pytest --record-mode=once tests

To confirm that network calls are mocked::

$ pytest --block-network tests

.. spacer
* Reformat code
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dev =
jupyter
pytest >= 5.3
pytest-cov >= 2.8
pytest-vcr
pytest-recording
restview
setuptools
sphinx
Expand Down
Loading

0 comments on commit c69e03f

Please sign in to comment.