def restore_system_launch_agents(): source = config.get_system_launch_agents_backup_dir() dest = config.get_system_launch_agents_dir() copy_dir(source, dest, with_sudo=True) ensure_dir_owned_by_user(dest, 'root:wheel', '644')
def test_restore_system_launch_agents(copy_mock, owned_mock): source = config.get_system_launch_agents_backup_dir() dest = config.get_system_launch_agents_dir() startup_items.restore_system_launch_agents() copy_mock.assert_called_with(source, dest, with_sudo=True) owned_mock.assert_called_with(dest, 'root:wheel', '644')
def backup_system_launch_agents(): source = config.get_system_launch_agents_dir() dest = config.get_system_launch_agents_backup_dir() copy_dir(source, dest)
def test_backup_system_launch_agents(copy_mock): source = config.get_system_launch_agents_dir() dest = config.get_system_launch_agents_backup_dir() startup_items.backup_system_launch_agents() copy_mock.assert_called_with(source, dest)