Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/ai/azure-ai-projects/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "python",
"TagPrefix": "python/ai/azure-ai-projects",
"Tag": "python/ai/azure-ai-projects_4160165ae8"
"Tag": "python/ai/azure-ai-projects_0c9b00044b"
}
13 changes: 13 additions & 0 deletions sdk/ai/azure-ai-projects/samples/agents/assets/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Force LF line endings for test files to ensure consistent binary representation
# across Windows and Linux platforms.
#
# These files are read and sent as binary REST API request payloads in tests.
# Without consistent line endings, the binary content differs between platforms,
# causing recorded test traffic to be inconsistent and test playback to fail.
#
# By enforcing LF endings, the binary representation remains identical regardless
# of the platform where tests are executed.

*.md text eol=lf
*.csv text eol=lf
*.jsonl text eol=lf
11 changes: 8 additions & 3 deletions sdk/ai/azure-ai-projects/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------

# Register MIME types before any other imports to ensure consistent Content-Type detection
# across Windows, macOS, and Linux when uploading files in tests
import mimetypes

mimetypes.add_type("text/csv", ".csv")
mimetypes.add_type("text/markdown", ".md")

import os
import pytest
from dotenv import load_dotenv, find_dotenv
Expand Down Expand Up @@ -100,9 +108,6 @@ def sanitize_url_paths():

sanitize_url_paths()

# Normalize Content-Type for CSV files in multipart form-data (varies by OS/Python version)
add_general_string_sanitizer(target="Content-Type: text/csv", value="Content-Type: application/vnd.ms-excel")

# Sanitize API key from service response (this includes Application Insights connection string)
add_body_key_sanitizer(json_path="credentials.key", value="sanitized-api-key")

Expand Down
Empty file.
4 changes: 0 additions & 4 deletions sdk/ai/azure-ai-projects/tests/samples/test_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ def _get_tools_sample_paths():
"sample_agent_browser_automation.py",
"sample_agent_code_interpreter.py",
"sample_agent_fabric.py",
"sample_agent_file_search.py",
"sample_agent_file_search_in_stream.py",
"sample_agent_mcp_with_project_connection.py",
"sample_agent_memory_search.py",
"sample_agent_openapi_with_project_connection.py",
Expand All @@ -192,8 +190,6 @@ def _get_tools_sample_paths_async():
# Skip async samples that are not yet ready for testing
tools_samples_to_skip = [
"sample_agent_code_interpreter_async.py",
"sample_agent_file_search_async.py",
"sample_agent_file_search_in_stream_async.py",
"sample_agent_mcp_with_project_connection_async.py",
"sample_agent_memory_search_async.py",
]
Expand Down