-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
This documentation was in your pull request and should live on in the repo, perhaps in a new file TESTS.md?
By default, all remote requests are mocked. To change this behaviour and actually call remote APIs (if you run this from a whitelisted IP address), the following environment variable can be set:
export DISABLE_MOCK_RESPONSES=1
If the remote APIs change, new mock data can be semi-automatically collected by setting another environment variable, running corresponding unit tests, and overwriting existin
g mock data in tests/data/mock_responses:
set environment variable (DISABLE_MOCK_RESPONSES should not be set)
export SAVE_MOCK_RESPONSES=./tmp/mock_responses
run the test for what mock data should be saved to $SAVE_MOCK_RESPONSES/<test_file>/<test_func>.jsonl
pytest tests/test_cli.py::test_basics
Metadata
Metadata
Assignees
Labels
No labels