mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Fix backup dir not existing (#134506)
This commit is contained in:
@@ -1397,6 +1397,9 @@ async def test_receive_backup(
|
||||
|
||||
with (
|
||||
patch("pathlib.Path.open", open_mock),
|
||||
patch(
|
||||
"homeassistant.components.backup.manager.make_backup_dir"
|
||||
) as make_backup_dir_mock,
|
||||
patch("shutil.move") as move_mock,
|
||||
patch(
|
||||
"homeassistant.components.backup.manager.read_backup",
|
||||
@@ -1412,6 +1415,7 @@ async def test_receive_backup(
|
||||
|
||||
assert resp.status == 201
|
||||
assert open_mock.call_count == open_call_count
|
||||
assert make_backup_dir_mock.call_count == move_call_count + 1
|
||||
assert move_mock.call_count == move_call_count
|
||||
for index, name in enumerate(move_path_names):
|
||||
assert move_mock.call_args_list[index].args[1].name == name
|
||||
|
||||
Reference in New Issue
Block a user