def test_logs_error_on_command_exception(logging_mock, *_):
    install_scripts("test_user")

    logging_mock.error.assert_called_once_with(
        "An error occurred: Something went wrong remotely!")
def test_runs_remote_installation_commands(
        run_remote_installation_commands_mock, *_):
    install_scripts("test_user")

    run_remote_installation_commands_mock.assert_called_once()
def test_instances_required_configurations(syno_config_mock, *_):
    install_scripts()
    syno_config_mock.assert_called_once()
def test_builds_destination_paths_according_to_username(
        build_destination_paths_mock, *_):
    install_scripts("test_user")

    build_destination_paths_mock.assert_called_once_with("test_user")
def test_optionally_accepts_username_as_parameter(*_):
    assert install_scripts("testuser") is None
    assert install_scripts() is None