CliDyn / climsight

prototype of a system that provide local climate information
BSD 3-Clause "New" or "Revised" License
27 stars 9 forks source link

Make tests with mock #79

Closed kuivi closed 3 months ago

kuivi commented 3 months ago

Add Test Functions with API Mocks. introduces test functions that use mocks to simulate API requests. Use the following commands to control test execution: pytest -m "not request": Runs tests with local data and mocks, avoiding real API requests. pytest -m "not mock_request": Runs tests with local data and actual API requests, avoiding mocks.

Workflow Update: In the workflows/ directory:

pytest -m "not local_data and not request"

This command excludes tests that require local data or make API requests.

After merging PR #69, data downloading can be integrated into workflows.

!!! fetch_biodiversity was modified to avoid random output due to "set"