File size: 1,214 Bytes
94ddfa7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"""
Pytest configuration for the Deepfake Detection Service tests.
"""

import sys
from pathlib import Path

# Add the backend directory to the Python path
backend_dir = Path(__file__).parent.parent
sys.path.insert(0, str(backend_dir))

import pytest
from fastapi.testclient import TestClient


@pytest.fixture
def test_client():
    """Provide a test client for API testing."""
    from app import app
    return TestClient(app)


@pytest.fixture
def sample_texts():
    """Provide sample text data for testing."""
    return {
        "ai_generated": "This is an AI-generated text that demonstrates the capabilities of modern language models in creating coherent and contextually appropriate content without human intervention.",
        "human_written": "I went to the store yesterday and bought some groceries. The weather was nice, and I enjoyed the walk.",
        "technical": "The implementation of neural networks requires careful consideration of hyperparameters, activation functions, and optimization techniques to achieve optimal performance.",
        "short": "Too short",
        "long": "A" * 5001,  # Exceeds 5000 char limit
        "minimum": "A" * 50,  # Exactly 50 chars (minimum valid)
    }