Пример #1
0
def restore_system_daemons_agents():
    source = config.get_system_launch_daemons_backup_dir()
    dest = config.get_system_launch_daemons_dir()
    copy_dir(source, dest, with_sudo=True)
    ensure_dir_owned_by_user(dest, 'root:wheel', '644')
Пример #2
0
def test_restore_system_daemons_agents(copy_mock, owned_mock):
    source = config.get_system_launch_daemons_backup_dir()
    dest = config.get_system_launch_daemons_dir()
    startup_items.restore_system_daemons_agents()
    copy_mock.assert_called_with(source, dest, with_sudo=True)
    owned_mock.assert_called_with(dest, 'root:wheel', '644')
Пример #3
0
def backup_system_daemons_agents():
    source = config.get_system_launch_daemons_dir()
    dest = config.get_system_launch_daemons_backup_dir()
    copy_dir(source, dest)
Пример #4
0
def test_backup_system_daemons_agents(copy_mock):
    source = config.get_system_launch_daemons_dir()
    dest = config.get_system_launch_daemons_backup_dir()
    startup_items.backup_system_daemons_agents()
    copy_mock.assert_called_with(source, dest)