mirror of
https://github.com/esphome/esphome.git
synced 2025-09-22 21:22:22 +01:00
[dashboard] Transfer DNS/mDNS cache from dashboard to CLI to avoid blocking (#10685)
This commit is contained in:
21
tests/dashboard/conftest.py
Normal file
21
tests/dashboard/conftest.py
Normal file
@@ -0,0 +1,21 @@
|
||||
"""Common fixtures for dashboard tests."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from unittest.mock import Mock
|
||||
|
||||
import pytest
|
||||
|
||||
from esphome.dashboard.core import ESPHomeDashboard
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_dashboard() -> Mock:
|
||||
"""Create a mock dashboard."""
|
||||
dashboard = Mock(spec=ESPHomeDashboard)
|
||||
dashboard.entries = Mock()
|
||||
dashboard.entries.async_all.return_value = []
|
||||
dashboard.stop_event = Mock()
|
||||
dashboard.stop_event.is_set.return_value = True
|
||||
dashboard.ping_request = Mock()
|
||||
return dashboard
|
Reference in New Issue
Block a user