mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-21 04:42:22 -06:00
Fix list_brief tests
This commit is contained in:
@@ -302,6 +302,7 @@ class NestedDeviceBaySerializer(WritableNestedSerializer):
|
||||
|
||||
class NestedInventoryItemSerializer(WritableNestedSerializer):
|
||||
url = serializers.HyperlinkedIdentityField(view_name='dcim-api:inventoryitem-detail')
|
||||
device = NestedDeviceSerializer(read_only=True)
|
||||
|
||||
class Meta:
|
||||
model = models.InventoryItem
|
||||
|
||||
@@ -289,6 +289,7 @@ class RackTest(APIViewTestCases.APIViewTestCase):
|
||||
|
||||
class RackReservationTest(APIViewTestCases.APIViewTestCase):
|
||||
model = RackReservation
|
||||
brief_fields = ['id', 'units', 'url', 'user']
|
||||
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
@@ -1303,7 +1304,7 @@ class DeviceBayTest(APIViewTestCases.APIViewTestCase):
|
||||
|
||||
class InventoryItemTest(APIViewTestCases.APIViewTestCase):
|
||||
model = InventoryItem
|
||||
brief_fields = ['id', 'name', 'url']
|
||||
brief_fields = ['device', 'id', 'name', 'url']
|
||||
|
||||
@classmethod
|
||||
def setUpTestData(cls):
|
||||
|
||||
Reference in New Issue
Block a user