mirror of
https://github.com/remnawave/python-sdk.git
synced 2026-05-13 12:16:42 +00:00
- 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.
19 lines
695 B
Python
19 lines
695 B
Python
import pytest
|
|
|
|
from remnawave_api.enums import TemplateType
|
|
from remnawave_api.models import TemplateResponseDto, UpdateTemplateRequestDto
|
|
|
|
|
|
@pytest.mark.asyncio
|
|
async def test_subscriptions_template(remnawave):
|
|
template_type: TemplateType = TemplateType.SINGBOX
|
|
template = await remnawave.subscriptions_template.get_template(
|
|
template_type=template_type
|
|
)
|
|
assert isinstance(template, TemplateResponseDto)
|
|
|
|
update_template = await remnawave.subscriptions_template.update_template(
|
|
UpdateTemplateRequestDto(template_type=template_type)
|
|
)
|
|
assert isinstance(update_template, TemplateResponseDto)
|
|
assert update_template.template_type == template_type
|