Skip to content

Commit

Permalink
Merge branch 'main' into update_retract_test
Browse files Browse the repository at this point in the history
  • Loading branch information
geemi725 committed Sep 16, 2024
2 parents 0751baf + 9d49b84 commit 42ea6bf
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,27 @@ Use the following commands:

See our GitHub Actions [`tests.yml`](.github/workflows/tests.yml) for further reference.

## Using `pytest-recording` and VCR cassettes

We use the [`pytest-recording`](https://github.com/kiwicom/pytest-recording) plugin
to create VCR cassettes to cache HTTP requests,
making our unit tests more deterministic.

To record a new VCR cassette:

```bash
uv run pytest --record-mode=once tests/desired_test_module.py
```

And the new cassette(s) should appear in [`tests/cassettes`](tests/cassettes).

Our configuration for `pytest-recording` can be found in [`tests/conftest.py`](tests/conftest.py).
This includes header removals (e.g. OpenAI `authorization` key)
from responses to ensure sensitive information is excluded from the cassettes.

Please ensure cassettes are less than 1 MB
to keep tests loading quickly.

## Additional resources

For more information on contributing, please refer to the [CONTRIBUTING.md](CONTRIBUTING.md) file in the repository.
Expand Down

0 comments on commit 42ea6bf

Please sign in to comment.