def METHOD_NAME(
    storage_mock, enterprise_data_fixture, synced_roles
):
    user, _ = enterprise_data_fixture.create_enterprise_admin_user_and_token(
        language="it"
    )
    with freeze_time("2023-01-01 12:00:00"):
        workspace_1 = CreateWorkspaceActionType.do(user, "workspace 1").workspace
    csv_settings = {
        "csv_column_separator": ",",
        "csv_first_row_header": False,
        "export_charset": "utf-8",
    }
    stub_file = BytesIO()
    storage_mock.open.return_value = stub_file
    close = stub_file.close
    stub_file.close = lambda: None
    csv_export_job = JobHandler().create_and_start_job(
        user, AuditLogExportJobType.type, **csv_settings, sync=True
    )
    csv_export_job.refresh_from_db()
    assert csv_export_job.state == JOB_FINISHED
    data = stub_file.getvalue().decode(csv_settings["export_charset"])
    bom = "\ufeff"
    assert data == (
        bom
        + f'{user.email},{user.id},{workspace_1.name},{workspace_1.id},Crea progetto,"Progetto ""{workspace_1.name}"" ({workspace_1.id}) creato.",2023-01-01 12:00:00+00:00,\r\n'
    )
    close()