Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
marcolivierarsenault committed Jan 16, 2024
1 parent 16fa185 commit 268eac5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,18 @@ async def test_opt_sensor_missing(hass, get_data, get_printer_objects_list):
assert state is None


async def test_missing_heater_bed(hass, get_data):
"""test."""
get_data["status"]["heater_bed"]["target"] = None

config_entry = MockConfigEntry(domain=DOMAIN, data=MOCK_CONFIG, entry_id="test")
config_entry.add_to_hass(hass)
assert await async_setup_entry(hass, config_entry)
await hass.async_block_till_done()

assert hass.states.get("sensor.mainsail_bed_target").state == "0.0"


async def test_eta(hass):
"""test."""
config_entry = MockConfigEntry(domain=DOMAIN, data=MOCK_CONFIG, entry_id="test")
Expand Down

0 comments on commit 268eac5

Please sign in to comment.