File size: 1,138 Bytes
8807ee2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
"""
Pytest configuration and shared fixtures.
"""

import os
import sys
from pathlib import Path

import pytest

# Add project root to path
PROJECT_ROOT = Path(__file__).parent.parent
sys.path.insert(0, str(PROJECT_ROOT))

# Set test environment variables
os.environ.setdefault("NVIDIA_API_KEY", "test-api-key")
os.environ.setdefault("SECRET_KEY", "test-secret-key")
os.environ.setdefault("DATABASE_URL", "sqlite:///./test.db")


@pytest.fixture
def sample_project_request():
    """Sample project request for testing."""
    return {
        "project_idea": "A todo list application with user authentication",
        "target_stack": ["Python", "FastAPI", "PostgreSQL", "React"],
    }


@pytest.fixture
def sample_context():
    """Sample context string for agent testing."""
    return """
    Project: Todo List Application
    
    Requirements:
    - User authentication with JWT
    - CRUD operations for todo items
    - PostgreSQL database
    - React frontend
    """


@pytest.fixture
def mock_llm_response():
    """Mock LLM response for testing."""
    return "## Implementation Plan\n\nThis is a mock response for testing."