Local changes: Updated model training, removed debug instrumentation, and configuration improvements
This commit is contained in:
2
tests/unit/alerts/__init__.py
Normal file
2
tests/unit/alerts/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
"""Unit tests for alert system."""
|
||||
|
||||
33
tests/unit/alerts/test_engine.py
Normal file
33
tests/unit/alerts/test_engine.py
Normal 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)
|
||||
|
||||
Reference in New Issue
Block a user