diff --git a/tests/unittests/portadmin/conftest.py b/tests/unittests/portadmin/conftest.py index d6ff307574..66102a03eb 100644 --- a/tests/unittests/portadmin/conftest.py +++ b/tests/unittests/portadmin/conftest.py @@ -3,14 +3,16 @@ import pytest from nav.enterprise.ids import VENDOR_ID_HEWLETT_PACKARD, VENDOR_ID_CISCOSYSTEMS +from nav.models.manage import ManagementProfile from nav.portadmin.management import ManagementFactory @pytest.fixture def profile(): - profile = Mock() - profile.snmp_version = 2 - profile.snmp_community = "public" + profile = ManagementProfile( + protocol=ManagementProfile.PROTOCOL_SNMP, + configuration={"version": 2, "community": "public"}, + ) return profile