diff --git a/tests/conftest.py b/tests/conftest.py index 6c44751..692d0a9 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -6,7 +6,7 @@ from typing_extensions import Unpack from netbox_config_diff.compliance.base import ConfigDiffBase -from netbox_config_diff.compliance.models import DeviceDataClass +from netbox_config_diff.models import ConplianceDeviceDataClass from tests.factories import DataSourceFactory @@ -97,6 +97,6 @@ def factory(**fields: Unpack["DeviceDataClassData"]) -> "DeviceDataClassData": @pytest.fixture() -def devicedataclass_data(devicedataclass_factory: "DeviceDataClassDataFactory") -> DeviceDataClass: +def devicedataclass_data(devicedataclass_factory: "DeviceDataClassDataFactory") -> ConplianceDeviceDataClass: data = devicedataclass_factory() - return DeviceDataClass(**data) + return ConplianceDeviceDataClass(**data) diff --git a/tests/test_compliance.py b/tests/test_compliance.py index e111ab1..5dc2dc1 100644 --- a/tests/test_compliance.py +++ b/tests/test_compliance.py @@ -4,8 +4,7 @@ from dcim.models import Device from utilities.exceptions import AbortScript -from netbox_config_diff.compliance.models import DeviceDataClass -from netbox_config_diff.models import ConfigCompliance +from netbox_config_diff.models import ConfigCompliance, ConplianceDeviceDataClass from tests.factories import ConfigComplianceFactory, DeviceFactory, PlatformSettingFactory if TYPE_CHECKING: @@ -144,7 +143,7 @@ def test_devicedataclass_to_db( devicedataclass_factory: "DeviceDataClassDataFactory", diff: str, error: str, status: str ) -> None: data = devicedataclass_factory(**{"diff": diff, "error": error}) - d = DeviceDataClass(**data) + d = ConplianceDeviceDataClass(**data) assert d.to_db() == { "device_id": d.pk,