Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ addopts = "-vs --cov-report term-missing --cov-report xml --dist loadscope"
[tool.ty.environment]
python-version = "3.10"

[tool.ty.rules]
possibly-missing-attribute = "error"

[[tool.ty.overrides]]
include = ["infrahub_sdk/**"]

Expand Down
5 changes: 3 additions & 2 deletions tests/unit/sdk/pool/test_allocate.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

from pytest_httpx import HTTPXMock

from infrahub_sdk.protocols import BuiltinIPAddressSync
from infrahub_sdk.protocols_base import CoreNode, CoreNodeSync
from infrahub_sdk.schema import NodeSchemaAPI
from tests.unit.sdk.conftest import BothClients
Expand Down Expand Up @@ -115,8 +116,8 @@ async def test_allocate_next_ip_address(
)

assert ip_address
assert str(cast("InfrahubNodeSync", ip_address).address.value) == "192.0.2.0/32"
assert cast("InfrahubNodeSync", ip_address).description.value == "test"
assert str(cast("BuiltinIPAddressSync", ip_address).address.value) == "192.0.2.0/32"
assert cast("BuiltinIPAddressSync", ip_address).description.value == "test"


@pytest.mark.parametrize("client_type", client_types)
Expand Down
Loading