Another try to get rid of Shelly flaky test (#43821)

This commit is contained in:
Paulus Schoutsen 2020-12-01 19:26:43 +01:00 committed by GitHub
parent 1faef0a4d4
commit 0ee86ea8e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View 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

View File

@ -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(