Remnawave_python-sdk/tests/test_system.py
Artem 41389d4205
Refactor SDK for Remnawave API v2.0.0 compatibility
- Updated models and response structures to align with API v2.0.0 specifications.
- Enhanced response handling to support both wrapped and unwrapped API responses.
- Added new controllers for ConfigProfiles, InternalSquads, InfraBilling, and NodesUsageHistory.
- Implemented RootModel patterns for list responses, allowing direct iteration and indexing.
- Updated tests to validate new models and endpoints, ensuring 20 out of 21 tests pass with real API integration.
- Fixed various bugs related to response handling and model validation.
- Documented migration path and breaking changes for users upgrading from v1.x to v2.0.0.
2025-07-01 15:06:07 +02:00

19 lines
578 B
Python

import pytest
from remnawave_api.models import (
GetBandwidthStatsResponseDto,
GetNodesStatisticsResponseDto,
GetStatsResponseDto,
)
@pytest.mark.asyncio
async def test_system(remnawave):
stats = await remnawave.system.get_stats()
assert isinstance(stats, GetStatsResponseDto)
bandwidth_stats = await remnawave.system.get_bandwidth_stats()
assert isinstance(bandwidth_stats, GetBandwidthStatsResponseDto)
nodes_statistics = await remnawave.system.get_nodes_statistics()
assert isinstance(nodes_statistics, GetNodesStatisticsResponseDto)