mirror of
https://github.com/home-assistant/core.git
synced 2025-12-25 05:26:47 +00:00
Fix evict_faked_translations fixture (#159419)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
This commit is contained in:
@@ -1270,9 +1270,11 @@ def evict_faked_translations(translations_once) -> Generator[_patch]:
|
||||
component_paths = components.__path__
|
||||
|
||||
for call in mock_component_strings.mock_calls:
|
||||
_components: set[str] = call.args[2]
|
||||
integrations: dict[str, loader.Integration] = call.args[3]
|
||||
for domain, integration in integrations.items():
|
||||
if any(
|
||||
for domain in _components:
|
||||
# If the integration exists, don't evict from cache
|
||||
if (integration := integrations.get(domain)) and any(
|
||||
pathlib.Path(f"{component_path}/{domain}") == integration.file_path
|
||||
for component_path in component_paths
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user