Remnawave_python-sdk/tests/test_users_stats.py
Artem f47cda9378
feat: Add models for subscriptions, users, and system statistics
- Implemented TemplateResponseDto and UpdateTemplateRequestDto for subscription templates.
- Created models for system statistics including CPU, memory, and bandwidth.
- Developed user models for user creation, updates, and responses.
- Added bulk actions for user updates and statistics tracking.
- Introduced tests for authentication, bandwidth statistics, hosts, inbounds, key generation, nodes, subscriptions, and user management.
- Enhanced utility functions for generating random strings, emails, and date ranges for testing.
2025-04-21 20:44:27 +02:00

14 lines
490 B
Python

import pytest
from remnawave_api.models import UserUsageByRangeResponseDto
from tests.conftest import REMNAWAVE_USER_UUID
from tests.utils import generate_isoformat_range
@pytest.mark.asyncio
async def test_users_stats(remnawave):
start, end = generate_isoformat_range()
user_usage_by_range = await remnawave.users_stats.get_user_usage_by_range(
uuid=REMNAWAVE_USER_UUID, start=start, end=end
)
assert isinstance(user_usage_by_range, UserUsageByRangeResponseDto)