mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-05-08 08:58:31 +01:00
Refactor addon git repo (#5987)
* Refactor Repository into setup with inheritance * Remove subclasses of GitRepo
This commit is contained in:
@@ -820,7 +820,7 @@ async def test_paths_cache(coresys: CoreSys, install_addon_ssh: Addon):
|
||||
|
||||
with (
|
||||
patch("supervisor.addons.addon.Path.exists", return_value=True),
|
||||
patch("supervisor.store.repository.Repository.update", return_value=True),
|
||||
patch("supervisor.store.repository.RepositoryLocal.update", return_value=True),
|
||||
):
|
||||
await coresys.store.reload(coresys.store.get("local"))
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ from supervisor.plugins.dns import PluginDns
|
||||
from supervisor.resolution.const import ContextType, IssueType, SuggestionType
|
||||
from supervisor.resolution.data import Issue, Suggestion
|
||||
from supervisor.store.addon import AddonStore
|
||||
from supervisor.store.repository import Repository
|
||||
from supervisor.store.repository import RepositoryLocal
|
||||
from supervisor.utils import check_exception_chain
|
||||
from supervisor.utils.common import write_json_file
|
||||
|
||||
@@ -442,7 +442,7 @@ async def test_store_data_changes_during_update(
|
||||
update_task = coresys.create_task(simulate_update())
|
||||
await asyncio.sleep(0)
|
||||
|
||||
with patch.object(Repository, "update", return_value=True):
|
||||
with patch.object(RepositoryLocal, "update", return_value=True):
|
||||
await coresys.store.reload()
|
||||
|
||||
assert "image" not in coresys.store.data.addons["local_ssh"]
|
||||
|
||||
Reference in New Issue
Block a user