Closed peterdudfield closed 6 months ago
Hi @peterdudfield, I'm a first timer to Open Climate Fix
I've refactored the test_read.py as follows :
tests/read/
1) test_get_sites.py Classes: TestGetAllSites TestGetSitesByCountry TestGetSiteByUUID
2) test_get_site.py Functions: test_get_site_group_by_name test_get_site_group_by_name_new_group test_get_all_users test_get_all_site_groups test_get_site_from_user test_get_site_list_max test_get_site_list_min
3) test_get_latest_status.py Classes: TestGetLatestStatus
4) test_get_PV_generation.py Classes: TestGetPVGenerationByUser TestGetPVGenerationBySites
5) test_get_latest_forecast_values.py Functions: _add_forecast_value test_get_latest_forecast_values test_get_latest_forecast_values_day_head test_get_latest_forecast_values_day_head_with_timezone
6) test_get_api_req.py Functions: test_get_all_last_api_request test_get_api_requests_for_one_user test_get_api_requests_for_one_user_start_datetime test_get_api_requests_for_one_user_end_datetime
7) test_get_user_by_email.py TestGetUserByEmail
Is this fine and should I send out PR?
Yea, thanks for doing this, a pr would be great
some small comments I'd be tempted to put 1 and 2 together, as they are all sites tests.
@peterdudfield Thank You :) , Can you please review into the PR.
Would be great to refactor test_read.py - https://github.com/openclimatefix/pv-site-datamodel/blob/main/tests/test_read.py as the file is a it long.
Could
Why? Makes it more readable, and easy to run a smaller amount of tests