un-inception/clients/python/async/tests/conftest.py
russell@unturf.com 1e01d09883 feat: per-client Makefile infrastructure for 4-mode testing
Add per-client Makefiles for C, Python, and Go with:
- CLI mode: Tests --help, arg parsing, syntax validation
- Library mode: Unit tests, import verification
- Integration mode: API contract validation (with credentials)
- Functional mode: Real-world scenario tests

C client:
- 22 library tests (SHA-256, HMAC-SHA256, detect_language)
- Full unsandbox.c implementation with examples

Python client (sync + async):
- Delegates to sync/ and async/ subdirectories
- pytest-based test suites with coverage
- Examples for concurrent execution, streaming

Go client:
- Delegates to sync/ and async/ subdirectories
- go test integration with vet and fmt

Also update detect-changes.sh to detect changes in
both root-level un.* files AND clients/ directory.
2026-01-15 16:39:56 -05:00

48 lines
920 B
Python

"""
Pytest configuration for async tests
"""
import pytest
import sys
import os
# Add src to path
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "src"))
@pytest.fixture
def mock_api_key():
"""Provide a mock API key for testing."""
return "test_public_key"
@pytest.fixture
def mock_secret_key():
"""Provide a mock secret key for testing."""
return "test_secret_key"
@pytest.fixture
def mock_job_id():
"""Provide a mock job ID for testing."""
return "job_12345_abcde"
@pytest.fixture
def mock_code():
"""Provide mock code for testing."""
return 'print("Hello World")'
@pytest.fixture
def mock_result():
"""Provide a mock API result."""
return {
"job_id": "job_12345",
"status": "completed",
"stdout": "Hello World\n",
"stderr": "",
"exit_code": 0,
"language": "python",
"duration_ms": 120,
}