mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Use a requests Session for rest sensors (#32463)
This avoids the ssl setup overhead for each request
This commit is contained in:
@@ -672,7 +672,7 @@ class TestRestData(unittest.TestCase):
|
||||
self.rest.update()
|
||||
assert "test data" == self.rest.data
|
||||
|
||||
@patch("requests.request", side_effect=RequestException)
|
||||
@patch("requests.Session.request", side_effect=RequestException)
|
||||
def test_update_request_exception(self, mock_req):
|
||||
"""Test update when a request exception occurs."""
|
||||
self.rest.update()
|
||||
|
||||
Reference in New Issue
Block a user