-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from Miicroo/17-feature-request-translation-or…
…-custom-value 17 feature request translation or custom value
- Loading branch information
Showing
6 changed files
with
79 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,5 @@ | |
"dependencies": [], | ||
"codeowners": ["@Miicroo"], | ||
"requirements": [], | ||
"version": "1.0.0" | ||
"version": "1.2.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"config": { | ||
"unit_of_measurement": { | ||
"single_day": "day", | ||
"multiple_days": "days" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"config": { | ||
"unit_of_measurement": { | ||
"single_day": "dag", | ||
"multiple_days": "dagen" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"config": { | ||
"unit_of_measurement": { | ||
"single_day": "dag", | ||
"multiple_days": "dagar" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,24 @@ | ||
"""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(): | ||
"""Mock translations globally.""" | ||
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 |