Load a fixture file from the fixtures directory.
(fixture_name: str)
| 8 | |
| 9 | |
| 10 | def load_fixture(fixture_name: str) -> str: |
| 11 | """Load a fixture file from the fixtures directory.""" |
| 12 | current_dir = os.path.dirname(os.path.abspath(__file__)) |
| 13 | fixtures_dir = os.path.join(current_dir, "fixtures") |
| 14 | with open(os.path.join(fixtures_dir, fixture_name), "r") as f: |
| 15 | return f.read() |
| 16 | |
| 17 | |
| 18 | def get_response(fixture_name: str) -> Iterator[bytes]: |