Skip to content

Commit fd73073

Browse files
committed
Change ContentType refs to ObjectType
1 parent 3c74f71 commit fd73073

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

netbox_custom_objects/tests/base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Test utilities for netbox_custom_objects plugin
2-
from django.contrib.contenttypes.models import ContentType
32
from django.test import Client
43
from core.models import ObjectType
54
from extras.models import CustomFieldChoiceSet

netbox_custom_objects/tests/test_field_types.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ class ObjectFieldTypeTestCase(FieldTypeTestCase):
602602
def setUp(self):
603603
"""Set up test data."""
604604
super().setUp()
605-
self.device_content_type = self.get_device_content_type()
605+
self.device_object_type = self.get_device_object_type()
606606

607607
def test_object_field_creation(self):
608608
"""Test creating an object field."""
@@ -611,11 +611,11 @@ def test_object_field_creation(self):
611611
name="device",
612612
label="Device",
613613
type="object",
614-
related_object_type=self.device_content_type
614+
related_object_type=self.device_object_type
615615
)
616616

617617
self.assertEqual(field.type, "object")
618-
self.assertEqual(field.related_object_type, self.device_content_type)
618+
self.assertEqual(field.related_object_type, self.device_object_type)
619619

620620
def test_object_field_model_generation(self):
621621
"""Test object field model generation."""
@@ -624,7 +624,7 @@ def test_object_field_model_generation(self):
624624
name="device",
625625
label="Device",
626626
type="object",
627-
related_object_type=self.device_content_type
627+
related_object_type=self.device_object_type
628628
)
629629
field # To silence ruff error
630630

@@ -661,7 +661,7 @@ class MultiObjectFieldTypeTestCase(FieldTypeTestCase):
661661
def setUp(self):
662662
"""Set up test data."""
663663
super().setUp()
664-
self.device_content_type = self.get_device_content_type()
664+
self.device_object_type = self.get_device_object_type()
665665

666666
def test_multiobject_field_creation(self):
667667
"""Test creating a multiobject field."""
@@ -670,11 +670,11 @@ def test_multiobject_field_creation(self):
670670
name="devices",
671671
label="Devices",
672672
type="multiobject",
673-
related_object_type=self.device_content_type
673+
related_object_type=self.device_object_type
674674
)
675675

676676
self.assertEqual(field.type, "multiobject")
677-
self.assertEqual(field.related_object_type, self.device_content_type)
677+
self.assertEqual(field.related_object_type, self.device_object_type)
678678

679679
def test_multiobject_field_model_generation(self):
680680
"""Test multiobject field model generation."""
@@ -683,7 +683,7 @@ def test_multiobject_field_model_generation(self):
683683
name="devices",
684684
label="Devices",
685685
type="multiobject",
686-
related_object_type=self.device_content_type
686+
related_object_type=self.device_object_type
687687
)
688688
field # To silence ruff error
689689

0 commit comments

Comments
 (0)