Fix uncaught exceptions for discovery, unify_direct, spotify,… (#33735)
* used coroutinemock to avoid exception * added spec to mock to remove exception * added the current_user return value so it doesnt throw exception * fix the mocks so properties do not need .return_value * fixed missing mock values that were causing exceptions * moved patch to asynctest so no need to define m_init * fixed black error
This commit is contained in:
6 files changed
+20
-29
No files matched your search
@@ -1,6 +1,7 @@
|
||||
"""The tests for the discovery component."""
|
||||
from unittest.mock import MagicMock, patch
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
from asynctest import patch
|
||||
import pytest
|
||||
|
||||
from homeassistant import config_entries
|
||||
|
||||
Reference in new issue
Block a user