1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Properly mock integrations' file_path (#156813)

This commit is contained in:
Abílio Costa
2025-11-18 18:42:35 +01:00
committed by GitHub
parent 7f14d013ac
commit 139ed34c74
3 changed files with 18 additions and 7 deletions

View File

@@ -84,7 +84,10 @@ async def test_evict_faked_translations_assumptions(hass: HomeAssistant) -> None
If this test fails, the evict_faked_translations may need to be updated.
"""
integration = mock_integration(hass, MockModule("test"), built_in=True)
assert integration.file_path == pathlib.Path("")
assert integration.file_path == pathlib.Path("homeassistant/components/test")
integration = mock_integration(hass, MockModule("test"), built_in=False)
assert integration.file_path == pathlib.Path("custom_components/test")
async def test_evict_faked_translations(hass: HomeAssistant, translations_once) -> None: