Skip to content

Commit

Permalink
Merge pull request #428 from peteeckel/feature/tests-netbox-4.0.0
Browse files Browse the repository at this point in the history
Made tests more compatible with NetBox 4.0
  • Loading branch information
peteeckel authored Oct 11, 2024
2 parents 15feff3 + 22c1bf7 commit f41f46d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions netbox_dns/tests/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@
from django.urls import reverse
from django.utils.module_loading import import_string

from strawberry.types.base import StrawberryList, StrawberryOptional
from strawberry.types.union import StrawberryUnion
from strawberry.types.lazy_type import LazyType
try:
from strawberry.types.base import StrawberryList, StrawberryOptional
from strawberry.types.union import StrawberryUnion
from strawberry.types.lazy_type import LazyType
except ImportError:
from strawberry.type import StrawberryList, StrawberryOptional
from strawberry.union import StrawberryUnion
from strawberry.lazy_type import LazyType


from ipam.graphql.types import IPAddressFamilyType
from utilities.testing.api import APITestCase as NetBoxAPITestCase
Expand Down
2 changes: 1 addition & 1 deletion netbox_dns/tests/test_netbox_dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from django.test import SimpleTestCase

from netbox_dns import __version__
from netbox_dns.tests.custom import APITestCase
from utilities.testing.api import APITestCase


class NetBoxDNSVersionTestCase(SimpleTestCase):
Expand Down

0 comments on commit f41f46d

Please sign in to comment.