Increase Tomato request timeout (#104203)
* tomato integration timeout fixed * update tests in tomato integration
This commit is contained in:
parent
a1678ebd23
commit
f8e3f1497c
2 changed files with 5 additions and 5 deletions
|
@ -100,10 +100,10 @@ class TomatoDeviceScanner(DeviceScanner):
|
|||
try:
|
||||
if self.ssl:
|
||||
response = requests.Session().send(
|
||||
self.req, timeout=3, verify=self.verify_ssl
|
||||
self.req, timeout=60, verify=self.verify_ssl
|
||||
)
|
||||
else:
|
||||
response = requests.Session().send(self.req, timeout=3)
|
||||
response = requests.Session().send(self.req, timeout=60)
|
||||
|
||||
# Calling and parsing the Tomato api here. We only need the
|
||||
# wldev and dhcpd_lease values.
|
||||
|
|
|
@ -157,7 +157,7 @@ def test_config_verify_ssl_but_no_ssl_enabled(
|
|||
assert "_http_id=1234567890" in result.req.body
|
||||
assert "exec=devlist" in result.req.body
|
||||
assert mock_session_send.call_count == 1
|
||||
assert mock_session_send.mock_calls[0] == mock.call(result.req, timeout=3)
|
||||
assert mock_session_send.mock_calls[0] == mock.call(result.req, timeout=60)
|
||||
|
||||
|
||||
@mock.patch("os.access", return_value=True)
|
||||
|
@ -192,7 +192,7 @@ def test_config_valid_verify_ssl_path(hass: HomeAssistant, mock_session_send) ->
|
|||
assert "exec=devlist" in result.req.body
|
||||
assert mock_session_send.call_count == 1
|
||||
assert mock_session_send.mock_calls[0] == mock.call(
|
||||
result.req, timeout=3, verify="/test/tomato.crt"
|
||||
result.req, timeout=60, verify="/test/tomato.crt"
|
||||
)
|
||||
|
||||
|
||||
|
@ -223,7 +223,7 @@ def test_config_valid_verify_ssl_bool(hass: HomeAssistant, mock_session_send) ->
|
|||
assert "exec=devlist" in result.req.body
|
||||
assert mock_session_send.call_count == 1
|
||||
assert mock_session_send.mock_calls[0] == mock.call(
|
||||
result.req, timeout=3, verify=False
|
||||
result.req, timeout=60, verify=False
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue