mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-27 23:35:01 +00:00
Raise UnauthorizedError when RdSAP Summary fetch returns 401 🟥
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
af6c461c93
commit
b596f32af1
1 changed files with 10 additions and 0 deletions
|
|
@ -323,3 +323,13 @@ def test_get_rdsap_summary_maps_pre_performance_fields() -> None:
|
|||
pre_current_co2_emissions=1.70,
|
||||
pre_current_energy_consumption=117.00,
|
||||
)
|
||||
|
||||
|
||||
def test_get_rdsap_summary_raises_unauthorized_on_401() -> None:
|
||||
# Arrange
|
||||
client = make_client()
|
||||
|
||||
# Act / Assert
|
||||
client.session.get = MagicMock(return_value=make_response(status_code=401))
|
||||
with pytest.raises(UnauthorizedError):
|
||||
client.get_rdsap_summary_by_job_id("job-1")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue