Skip to content

Commit

Permalink
pytest-recording tip
Browse files Browse the repository at this point in the history
Refs #2
  • Loading branch information
simonw authored Nov 18, 2024
1 parent 5af719d commit cfe61b5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,16 @@ To run the tests:
```bash
pytest
```

This project uses [pytest-recording](https://github.com/kiwicom/pytest-recording) to record Gemini API responses for the tests.

If you add a new test that calls the API you can capture the API response like this:
```bash
PYTEST_GEMINI_API_KEY="$(llm keys get gemini)" pytest --record-mode once
```
You will need to have stored a valid Gemini API key using this command first:
```bash
llm keys set gemini
# Paste key here
```

0 comments on commit cfe61b5

Please sign in to comment.