mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Another try to get rid of Shelly flaky test (#43821)
This commit is contained in:
parent
1faef0a4d4
commit
0ee86ea8e4
11
tests/components/shelly/conftest.py
Normal file
11
tests/components/shelly/conftest.py
Normal file
@ -0,0 +1,11 @@
|
||||
"""Test configuration for Shelly."""
|
||||
import pytest
|
||||
|
||||
from tests.async_mock import patch
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def mock_coap():
|
||||
"""Mock out coap."""
|
||||
with patch("homeassistant.components.shelly.get_coap_context"):
|
||||
yield
|
@ -36,7 +36,7 @@ async def test_form(hass):
|
||||
assert result["type"] == "form"
|
||||
assert result["errors"] == {}
|
||||
|
||||
with patch("aioshelly.COAP", return_value=Mock(initialize=AsyncMock())), patch(
|
||||
with patch(
|
||||
"aioshelly.get_info",
|
||||
return_value={"mac": "test-mac", "type": "SHSW-1", "auth": False},
|
||||
), patch(
|
||||
|
Loading…
x
Reference in New Issue
Block a user