mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 20:40:18 +00:00
Fix logic in backup retention filter (#133654)
This commit is contained in:
@@ -1331,6 +1331,35 @@ async def test_config_schedule_logic(
|
||||
0,
|
||||
[],
|
||||
),
|
||||
(
|
||||
{
|
||||
"type": "backup/config/update",
|
||||
"create_backup": {"agent_ids": ["test.test-agent"]},
|
||||
"retention": {"copies": 3, "days": None},
|
||||
"schedule": "daily",
|
||||
},
|
||||
{
|
||||
"backup-1": MagicMock(
|
||||
date="2024-11-10T04:45:00+01:00",
|
||||
with_automatic_settings=True,
|
||||
spec=ManagerBackup,
|
||||
),
|
||||
"backup-2": MagicMock(
|
||||
date="2024-11-11T04:45:00+01:00",
|
||||
with_automatic_settings=True,
|
||||
spec=ManagerBackup,
|
||||
),
|
||||
},
|
||||
{},
|
||||
{},
|
||||
"2024-11-11T04:45:00+01:00",
|
||||
"2024-11-12T04:45:00+01:00",
|
||||
"2024-11-12T04:45:00+01:00",
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
[],
|
||||
),
|
||||
(
|
||||
{
|
||||
"type": "backup/config/update",
|
||||
|
||||
Reference in New Issue
Block a user