""" Fixtures for security module tests. """ import pytest @pytest.fixture def mock_pdf_content(): """Create minimal valid PDF content for testing.""" return b"""%PDF-1.4 1 0 obj << /Type /Catalog /Pages 2 0 R >> endobj 2 0 obj << /Type /Pages /Kids [3 0 R] /Count 1 >> endobj 3 0 obj << /Type /Page /Parent 2 0 R /MediaBox [0 0 612 792] >> endobj xref 0 4 0000000000 65535 f 0000000009 00000 n 0000000058 00000 n 0000000115 00000 n trailer << /Size 4 /Root 1 0 R >> startxref 193 %%EOF""" @pytest.fixture def sample_data_with_secrets(): """Sample data containing sensitive keys.""" return { "username": "testuser", "email": "test@example.com", "api_key": "sk-secret-12345", "password": "supersecretpassword", "settings": { "theme": "dark", "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9", }, "items": [ {"name": "item1", "secret": "hidden_value"}, {"name": "item2", "value": "visible"}, ], } @pytest.fixture def sample_urls(): """Collection of sample URLs for testing.""" return { "valid_http": "http://example.com", "valid_https": "https://example.com/page", "valid_arxiv": "https://arxiv.org/abs/2301.12345", "valid_pubmed": "https://pubmed.ncbi.nlm.nih.gov/12345678", "javascript": "javascript:alert('xss')", "data": "data:text/html,", "vbscript": "vbscript:msgbox('xss')", "file": "file:///etc/passwd", "mailto": "mailto:test@example.com", "fragment": "#section-1", "empty": "", "none": None, }