mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-19 15:16:33 +00:00
Jobs reset saves data (#4007)
This commit is contained in:
parent
2809f23391
commit
a8133f0640
@ -64,6 +64,8 @@ class FileConfiguration:
|
||||
_LOGGER.error(
|
||||
"Can't reset %s: %s", self._file, humanize_error(self._data, ex)
|
||||
)
|
||||
else:
|
||||
self.save_data()
|
||||
|
||||
def read_data(self) -> None:
|
||||
"""Read configuration file."""
|
||||
|
@ -45,8 +45,10 @@ async def test_api_jobs_reset(api_client, coresys):
|
||||
assert coresys.jobs.save_data.called
|
||||
assert coresys.jobs.ignore_conditions == [JobCondition.HEALTHY]
|
||||
|
||||
coresys.jobs.save_data.reset_mock()
|
||||
resp = await api_client.post("/jobs/reset")
|
||||
result = await resp.json()
|
||||
assert result["result"] == "ok"
|
||||
|
||||
assert coresys.jobs.ignore_conditions == []
|
||||
coresys.jobs.save_data.assert_called_once()
|
||||
|
Loading…
x
Reference in New Issue
Block a user