mirror of
https://github.com/wizarrrr/wizarr.git
synced 2026-07-31 23:37:07 -04:00
- 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.
20 lines
550 B
Python
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
|