mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 01:08:12 +00:00

Co-authored-by: Franck Nijhof <frenck@frenck.nl> Co-authored-by: Sander Hoentjen <sander@hoentjen.eu> Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io> Co-authored-by: Robert Resch <robert@resch.dev>
16 lines
543 B
Python
16 lines
543 B
Python
"""Tests for the system info helper."""
|
|
|
|
from unittest.mock import patch
|
|
|
|
from homeassistant.util.system_info import is_official_image
|
|
|
|
|
|
async def test_is_official_image() -> None:
|
|
"""Test is_official_image."""
|
|
is_official_image.cache_clear()
|
|
with patch("homeassistant.util.system_info.os.path.isfile", return_value=True):
|
|
assert is_official_image() is True
|
|
is_official_image.cache_clear()
|
|
with patch("homeassistant.util.system_info.os.path.isfile", return_value=False):
|
|
assert is_official_image() is False
|