This PR adds unit tests for the DemandApi class and covers various endpoints related to demand data, including actual total load, daily outturn, and streaming data. The new tests cover scenarios including successful API calls, empty responses, error handling, and parameter validation.
Changes
Added following test methods in the TestDemandApi class:
Description
This PR adds unit tests for the
DemandApi
class and covers various endpoints related to demand data, including actual total load, daily outturn, and streaming data. The new tests cover scenarios including successful API calls, empty responses, error handling, and parameter validation.Changes
Added following test methods in the TestDemandApi class:
test_demand_actual_total_get
test_demand_outturn_daily_get
test_demand_outturn_daily_stream_get
test_demand_outturn_daily_stream_get_empty
test_demand_outturn_daily_stream_get_error
test_demand_outturn_get
test_demand_outturn_get_empty
test_demand_outturn_get_error
test_demand_outturn_get_with_parameters
Testing
To run the new tests:
python -m unittest test_demand_api.py
Checklist: