Adjust invalid test values in snmp (#86006)
This commit is contained in:
parent
c1589d3c89
commit
8165f487c7
1 changed files with 3 additions and 3 deletions
|
@ -15,7 +15,7 @@ from homeassistant.setup import async_setup_component
|
|||
def hlapi_mock():
|
||||
"""Mock out 3rd party API."""
|
||||
mock_data = MagicMock()
|
||||
mock_data.prettyPrint = Mock(return_value="hello")
|
||||
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(
|
||||
|
@ -40,7 +40,7 @@ async def test_basic_config(hass: HomeAssistant) -> None:
|
|||
await hass.async_block_till_done()
|
||||
|
||||
state = hass.states.get("sensor.snmp")
|
||||
assert state.state == "hello"
|
||||
assert state.state == "13.5"
|
||||
assert state.attributes == {"friendly_name": "SNMP"}
|
||||
|
||||
|
||||
|
@ -71,7 +71,7 @@ async def test_entity_config(hass: HomeAssistant) -> None:
|
|||
assert entity_registry.async_get("sensor.snmp_sensor").unique_id == "very_unique"
|
||||
|
||||
state = hass.states.get("sensor.snmp_sensor")
|
||||
assert state.state == "hello"
|
||||
assert state.state == "13.5"
|
||||
assert state.attributes == {
|
||||
"device_class": "temperature",
|
||||
"entity_picture": "blabla.png",
|
||||
|
|
Loading…
Add table
Reference in a new issue