mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Bump brother
and pysnmplib
backend libraries (#89100)
* Bump brother and pysnmplib * Fix tests
This commit is contained in:
parent
62b0603b76
commit
6dc99d2ad8
@ -8,7 +8,7 @@
|
|||||||
"iot_class": "local_polling",
|
"iot_class": "local_polling",
|
||||||
"loggers": ["brother", "pyasn1", "pysmi", "pysnmp"],
|
"loggers": ["brother", "pyasn1", "pysmi", "pysnmp"],
|
||||||
"quality_scale": "platinum",
|
"quality_scale": "platinum",
|
||||||
"requirements": ["brother==2.2.0"],
|
"requirements": ["brother==2.3.0"],
|
||||||
"zeroconf": [
|
"zeroconf": [
|
||||||
{
|
{
|
||||||
"type": "_printer._tcp.local.",
|
"type": "_printer._tcp.local.",
|
||||||
|
@ -5,5 +5,5 @@
|
|||||||
"documentation": "https://www.home-assistant.io/integrations/snmp",
|
"documentation": "https://www.home-assistant.io/integrations/snmp",
|
||||||
"iot_class": "local_polling",
|
"iot_class": "local_polling",
|
||||||
"loggers": ["pyasn1", "pysmi", "pysnmp"],
|
"loggers": ["pyasn1", "pysmi", "pysnmp"],
|
||||||
"requirements": ["pysnmplib==5.0.20"]
|
"requirements": ["pysnmplib==5.0.21"]
|
||||||
}
|
}
|
||||||
|
@ -145,7 +145,7 @@ async def async_setup_platform(
|
|||||||
ContextData(),
|
ContextData(),
|
||||||
]
|
]
|
||||||
get_result = await getCmd(*request_args, ObjectType(ObjectIdentity(baseoid)))
|
get_result = await getCmd(*request_args, ObjectType(ObjectIdentity(baseoid)))
|
||||||
errindication, _, _, _ = await get_result
|
errindication, _, _, _ = get_result
|
||||||
|
|
||||||
if errindication and not accept_errors:
|
if errindication and not accept_errors:
|
||||||
_LOGGER.error("Please check the details in the configuration file")
|
_LOGGER.error("Please check the details in the configuration file")
|
||||||
@ -207,7 +207,7 @@ class SnmpData:
|
|||||||
get_result = await getCmd(
|
get_result = await getCmd(
|
||||||
*self._request_args, ObjectType(ObjectIdentity(self._baseoid))
|
*self._request_args, ObjectType(ObjectIdentity(self._baseoid))
|
||||||
)
|
)
|
||||||
errindication, errstatus, errindex, restable = await get_result
|
errindication, errstatus, errindex, restable = get_result
|
||||||
|
|
||||||
if errindication and not self._accept_errors:
|
if errindication and not self._accept_errors:
|
||||||
_LOGGER.error("SNMP error: %s", errindication)
|
_LOGGER.error("SNMP error: %s", errindication)
|
||||||
|
@ -261,7 +261,7 @@ class SnmpSwitch(SwitchEntity):
|
|||||||
get_result = await getCmd(
|
get_result = await getCmd(
|
||||||
*self._request_args, ObjectType(ObjectIdentity(self._baseoid))
|
*self._request_args, ObjectType(ObjectIdentity(self._baseoid))
|
||||||
)
|
)
|
||||||
errindication, errstatus, errindex, restable = await get_result
|
errindication, errstatus, errindex, restable = get_result
|
||||||
|
|
||||||
if errindication:
|
if errindication:
|
||||||
_LOGGER.error("SNMP error: %s", errindication)
|
_LOGGER.error("SNMP error: %s", errindication)
|
||||||
|
@ -480,7 +480,7 @@ boto3==1.20.24
|
|||||||
broadlink==0.18.3
|
broadlink==0.18.3
|
||||||
|
|
||||||
# homeassistant.components.brother
|
# homeassistant.components.brother
|
||||||
brother==2.2.0
|
brother==2.3.0
|
||||||
|
|
||||||
# homeassistant.components.brottsplatskartan
|
# homeassistant.components.brottsplatskartan
|
||||||
brottsplatskartan==0.0.1
|
brottsplatskartan==0.0.1
|
||||||
@ -1982,7 +1982,7 @@ pysmarty==0.8
|
|||||||
pysml==0.0.8
|
pysml==0.0.8
|
||||||
|
|
||||||
# homeassistant.components.snmp
|
# homeassistant.components.snmp
|
||||||
pysnmplib==5.0.20
|
pysnmplib==5.0.21
|
||||||
|
|
||||||
# homeassistant.components.snooz
|
# homeassistant.components.snooz
|
||||||
pysnooz==0.8.3
|
pysnooz==0.8.3
|
||||||
|
@ -393,7 +393,7 @@ boschshcpy==0.2.35
|
|||||||
broadlink==0.18.3
|
broadlink==0.18.3
|
||||||
|
|
||||||
# homeassistant.components.brother
|
# homeassistant.components.brother
|
||||||
brother==2.2.0
|
brother==2.3.0
|
||||||
|
|
||||||
# homeassistant.components.brunt
|
# homeassistant.components.brunt
|
||||||
brunt==1.2.0
|
brunt==1.2.0
|
||||||
@ -1435,7 +1435,7 @@ pysmartthings==0.7.6
|
|||||||
pysml==0.0.8
|
pysml==0.0.8
|
||||||
|
|
||||||
# homeassistant.components.snmp
|
# homeassistant.components.snmp
|
||||||
pysnmplib==5.0.20
|
pysnmplib==5.0.21
|
||||||
|
|
||||||
# homeassistant.components.snooz
|
# homeassistant.components.snooz
|
||||||
pysnooz==0.8.3
|
pysnooz==0.8.3
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
"""SNMP sensor tests."""
|
"""SNMP sensor tests."""
|
||||||
|
|
||||||
import asyncio
|
|
||||||
from unittest.mock import MagicMock, Mock, patch
|
from unittest.mock import MagicMock, Mock, patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
@ -16,11 +15,9 @@ def hlapi_mock():
|
|||||||
"""Mock out 3rd party API."""
|
"""Mock out 3rd party API."""
|
||||||
mock_data = MagicMock()
|
mock_data = MagicMock()
|
||||||
mock_data.prettyPrint = Mock(return_value="13.5")
|
mock_data.prettyPrint = Mock(return_value="13.5")
|
||||||
future = asyncio.get_event_loop().create_future()
|
|
||||||
future.set_result((None, None, None, [[mock_data]]))
|
|
||||||
with patch(
|
with patch(
|
||||||
"homeassistant.components.snmp.sensor.getCmd",
|
"homeassistant.components.snmp.sensor.getCmd",
|
||||||
return_value=future,
|
return_value=(None, None, None, [[mock_data]]),
|
||||||
):
|
):
|
||||||
yield
|
yield
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user