Spaces:
Sleeping
Sleeping
| """ | |
| Test package initialization. | |
| Contains test configuration and shared fixtures. | |
| """ | |
| import os | |
| import sys | |
| import pytest | |
| # Add parent directory to path for importing application modules | |
| sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | |
| # Test configuration | |
| TEST_CONFIG = { | |
| 'GITHUB_TOKEN': 'test_github_token', | |
| 'PRODUCT_HUNT_TOKEN': 'test_producthunt_token', | |
| 'REDDIT_CLIENT_ID': 'test_reddit_client_id', | |
| 'REDDIT_CLIENT_SECRET': 'test_reddit_secret', | |
| 'REDDIT_USER_AGENT': 'test_reddit_agent' | |
| } | |
| # Common pytest fixtures | |
| def mock_credentials(): | |
| """Fixture to provide mock credentials for testing.""" | |
| return { | |
| 'project_id': 'test-project', | |
| 'credentials_path': '/path/to/test/credentials.json' | |
| } | |
| def mock_model(): | |
| """Fixture to provide mock Gemini model for testing.""" | |
| class MockModel: | |
| def generate_content(self, prompt): | |
| return type('Response', (), {'text': 'Test response'})() | |
| return MockModel() |