Bump brother and pysnmplib (#84107)

* Bump brother version

* Bump pysnmplib version

* Update sensor platform

* Update switch platform

* Update tests

* Bump brother

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Maciej Bieniek 2022-12-17 12:34:43 +01:00 committed by GitHub
parent 768d147cb2
commit d9903c4cf9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 13 deletions

View file

@ -1,5 +1,6 @@
"""SNMP sensor tests."""
import asyncio
from unittest.mock import MagicMock, Mock, patch
import pytest
@ -15,9 +16,11 @@ def hlapi_mock():
"""Mock out 3rd party API."""
mock_data = MagicMock()
mock_data.prettyPrint = Mock(return_value="hello")
future = asyncio.get_event_loop().create_future()
future.set_result((None, None, None, [[mock_data]]))
with patch(
"homeassistant.components.snmp.sensor.getCmd",
return_value=(None, None, None, [[mock_data]]),
return_value=future,
):
yield