homedocs/tests/test_app.py
2025-03-30 19:20:13 +02:00

11 lines
288 B
Python

import pytest
from app.core import models
# Example test
@pytest.mark.parametrize("cidr, expected", [
('192.168.1.0/24', 256),
('10.0.0.0/8', 16777216),
])
def test_subnet_cidr_parsing(cidr, expected):
subnet = models.Subnet(cidr=cidr)
assert subnet.used_ips == expected