1515from dateutil import parser
1616import pytest
1717
18- from homeassistant .components .amberelectric .const import CONF_SITE_ID , CONF_SITE_NAME
18+ from homeassistant .components .amberelectric .const import (
19+ CONF_SITE_ID ,
20+ CONF_SITE_NAME ,
21+ REQUEST_TIMEOUT ,
22+ )
1923from homeassistant .components .amberelectric .coordinator import AmberUpdateCoordinator
2024from homeassistant .const import CONF_API_TOKEN
2125from homeassistant .core import HomeAssistant
@@ -104,7 +108,9 @@ async def test_fetch_general_site(hass: HomeAssistant, current_price_api: Mock)
104108 result = await data_service ._async_update_data ()
105109
106110 current_price_api .get_current_prices .assert_called_with (
107- GENERAL_ONLY_SITE_ID , next = 288
111+ GENERAL_ONLY_SITE_ID ,
112+ next = 288 ,
113+ _request_timeout = REQUEST_TIMEOUT ,
108114 )
109115
110116 assert result ["current" ].get ("general" ) == GENERAL_CHANNEL [0 ].actual_instance
@@ -136,7 +142,9 @@ async def test_fetch_no_general_site(
136142 await data_service ._async_update_data ()
137143
138144 current_price_api .get_current_prices .assert_called_with (
139- GENERAL_ONLY_SITE_ID , next = 288
145+ GENERAL_ONLY_SITE_ID ,
146+ next = 288 ,
147+ _request_timeout = REQUEST_TIMEOUT ,
140148 )
141149
142150
@@ -150,7 +158,9 @@ async def test_fetch_api_error(hass: HomeAssistant, current_price_api: Mock) ->
150158 result = await data_service ._async_update_data ()
151159
152160 current_price_api .get_current_prices .assert_called_with (
153- GENERAL_ONLY_SITE_ID , next = 288
161+ GENERAL_ONLY_SITE_ID ,
162+ next = 288 ,
163+ _request_timeout = REQUEST_TIMEOUT ,
154164 )
155165
156166 assert result ["current" ].get ("general" ) == GENERAL_CHANNEL [0 ].actual_instance
@@ -201,7 +211,9 @@ async def test_fetch_general_and_controlled_load_site(
201211 result = await data_service ._async_update_data ()
202212
203213 current_price_api .get_current_prices .assert_called_with (
204- GENERAL_AND_CONTROLLED_SITE_ID , next = 288
214+ GENERAL_AND_CONTROLLED_SITE_ID ,
215+ next = 288 ,
216+ _request_timeout = REQUEST_TIMEOUT ,
205217 )
206218
207219 assert result ["current" ].get ("general" ) == GENERAL_CHANNEL [0 ].actual_instance
@@ -241,7 +253,9 @@ async def test_fetch_general_and_feed_in_site(
241253 result = await data_service ._async_update_data ()
242254
243255 current_price_api .get_current_prices .assert_called_with (
244- GENERAL_AND_FEED_IN_SITE_ID , next = 288
256+ GENERAL_AND_FEED_IN_SITE_ID ,
257+ next = 288 ,
258+ _request_timeout = REQUEST_TIMEOUT ,
245259 )
246260
247261 assert result ["current" ].get ("general" ) == GENERAL_CHANNEL [0 ].actual_instance
0 commit comments