Skip to content

Commit

Permalink
Adjust invalid test values in snmp (#86006)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet authored Jan 16, 2023
1 parent c1589d3 commit 8165f48
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/components/snmp/test_sensor.py
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
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",

0 comments on commit 8165f48

Please sign in to comment.