conftest.py 615 B

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