conftest.py 594 B

12345678910111213141516171819202122232425262728
  1. import pytest
  2. from pytest_homeassistant_custom_component.common import MockConfigEntry
  3. from custom_components.room_cal_ha.const import (
  4. CONF_CALDAV_ENABLED,
  5. CONF_CURRENT_NAME,
  6. CONF_NEXT_NAME,
  7. CONF_ROOM_STATE_NAME,
  8. DOMAIN,
  9. )
  10. @pytest.fixture(autouse=True)
  11. def auto_enable_custom_integrations(enable_custom_integrations):
  12. yield
  13. @pytest.fixture
  14. def mock_entry():
  15. return MockConfigEntry(
  16. domain=DOMAIN,
  17. data={
  18. CONF_ROOM_STATE_NAME: "Room State",
  19. CONF_CURRENT_NAME: "Current",
  20. CONF_NEXT_NAME: "Next",
  21. },
  22. options={CONF_CALDAV_ENABLED: False},
  23. )