mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Increase Tomato request timeout (#104203)
* tomato integration timeout fixed * update tests in tomato integration
This commit is contained in:
parent
a1678ebd23
commit
f8e3f1497c
@ -100,10 +100,10 @@ class TomatoDeviceScanner(DeviceScanner):
|
|||||||
try:
|
try:
|
||||||
if self.ssl:
|
if self.ssl:
|
||||||
response = requests.Session().send(
|
response = requests.Session().send(
|
||||||
self.req, timeout=3, verify=self.verify_ssl
|
self.req, timeout=60, verify=self.verify_ssl
|
||||||
)
|
)
|
||||||
else:
|
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
|
# Calling and parsing the Tomato api here. We only need the
|
||||||
# wldev and dhcpd_lease values.
|
# 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 "_http_id=1234567890" in result.req.body
|
||||||
assert "exec=devlist" in result.req.body
|
assert "exec=devlist" in result.req.body
|
||||||
assert mock_session_send.call_count == 1
|
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)
|
@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 "exec=devlist" in result.req.body
|
||||||
assert mock_session_send.call_count == 1
|
assert mock_session_send.call_count == 1
|
||||||
assert mock_session_send.mock_calls[0] == mock.call(
|
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 "exec=devlist" in result.req.body
|
||||||
assert mock_session_send.call_count == 1
|
assert mock_session_send.call_count == 1
|
||||||
assert mock_session_send.mock_calls[0] == mock.call(
|
assert mock_session_send.mock_calls[0] == mock.call(
|
||||||
result.req, timeout=3, verify=False
|
result.req, timeout=60, verify=False
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user