Files
wizarr/tests/activity/test_activity_service.py
Matthieu B 0ac98355dd feat(activity): Implement activity ingestion, identity resolution, and maintenance services
- Added `identity_resolution.py` for resolving Wizarr users and identities.
- Created `ingestion.py` to handle recording and updating activity events.
- Introduced `maintenance.py` for cleanup and session management tasks.
- Developed `queries.py` for read-oriented operations on activity sessions.
- Implemented background tasks in `activity.py` for scheduled maintenance.
- Added tests for activity services and blueprint to ensure functionality.
2025-10-16 15:18:31 +02:00

20 lines
550 B
Python

from app.activity.domain.models import ActivityQuery
from app.services.activity import ActivityService
def test_activity_service_dashboard_stats_without_db():
service = ActivityService()
stats = service.get_dashboard_stats()
assert isinstance(stats, dict)
assert stats["total_sessions"] == 0
assert "time_series_labels" in stats
def test_activity_service_query_without_db():
service = ActivityService()
sessions, total = service.get_activity_sessions(ActivityQuery())
assert sessions == []
assert total == 0