Commit c306b04
fix: Replace example.com URL and mock network in test_evcc (#291)
test_evcc.py used 'http://test.example.com/api/prices' as the test URL.
get_prices() calls refresh_data() which always hits the network on the
first call (next_update_ts == 0), even when store_raw_data() was called
beforehand. This caused the pipeline to make a real HTTP request to an
external domain.
- Replace test URL with 'https://demo.evcc.io/api/tariff/grid'
- Mock get_raw_data_from_provider in test_get_prices_with_target_resolution_60
so the test is fully self-contained and never reaches out to the network
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 700f192 commit c306b04
1 file changed
Lines changed: 13 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
372 | 376 | | |
373 | | - | |
374 | | - | |
375 | | - | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
376 | 380 | | |
377 | | - | |
| 381 | + | |
378 | 382 | | |
379 | 383 | | |
380 | 384 | | |
| |||
0 commit comments