Initial commit: Crypto trader application

This commit is contained in:
2025-12-25 20:20:40 -05:00
commit 07a04c1bb8
47895 changed files with 2042266 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
"""Tests for alert engine."""
import pytest
from src.alerts.engine import get_alert_engine, AlertEngine
class TestAlertEngine:
"""Tests for AlertEngine."""
@pytest.fixture
def alert_engine(self):
"""Create alert engine instance."""
return get_alert_engine()
def test_alert_engine_initialization(self, alert_engine):
"""Test alert engine initialization."""
assert alert_engine is not None
@pytest.mark.asyncio
async def test_process_alert(self, alert_engine):
"""Test processing alert."""
# Create test alert
alert = {
'name': 'test_alert',
'type': 'price',
'condition': 'BTC/USD > 50000',
'is_active': True
}
# Process alert (simplified)
result = await alert_engine.process_alert(alert, {'BTC/USD': 51000.0})
assert isinstance(result, bool)