Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Miicroo committed Oct 10, 2024
1 parent c2c9941 commit 1f9701c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
"""pytest fixtures."""
from unittest.mock import patch

import pytest

from custom_components.birthdays import Translation


@pytest.fixture(autouse=True)
def auto_enable_custom_integrations(enable_custom_integrations):
"""Enable custom integrations defined in the test dir."""
yield


@pytest.fixture(autouse=True)
def mock_translations():
translation = Translation(single_day_unit='day', multiple_days_unit='days')
with patch("custom_components.birthdays._get_translation", return_value=translation, autospec=True) as m:
yield m

0 comments on commit 1f9701c

Please sign in to comment.