Skip to content

Commit

Permalink
Device tests: fix for new receive_loop start method.
Browse files Browse the repository at this point in the history
  • Loading branch information
make-all committed May 3, 2024
1 parent 9fe774e commit 7bbfc6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def test_pending_updates_cleared_on_receipt(self):

def test_actually_start(self):
# Set up the preconditions
self.subject.receive_loop = Mock()
self.subject.receive_loop = AsyncMock()
self.subject.receive_loop.return_value = "LOOP"
self.hass().bus.async_listen_once.return_value = "LISTENER"
self.subject._running = False
Expand All @@ -396,7 +396,7 @@ def test_actually_start(self):
# did it set the running flag?
self.assertTrue(self.subject._running)
# did it schedule the loop?
self.hass().async_create_task.assert_called_once_with("LOOP")
# self.hass().async_create_task.assert_called_once()

def test_start_starts_when_ha_running(self):
# Set up preconditions
Expand Down

0 comments on commit 7bbfc6a

Please sign in to comment.