mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Add test for VM interface type choices
This commit is contained in:
@ -2,7 +2,7 @@ from django.urls import reverse
|
||||
from netaddr import IPNetwork
|
||||
from rest_framework import status
|
||||
|
||||
from dcim.choices import InterfaceModeChoices, InterfaceTypeChoices
|
||||
from dcim.choices import InterfaceModeChoices
|
||||
from dcim.models import Interface
|
||||
from ipam.models import IPAddress, VLAN
|
||||
from utilities.testing import APITestCase, choices_to_dict
|
||||
@ -22,6 +22,9 @@ class ChoicesTest(APITestCase):
|
||||
# VirtualMachine
|
||||
self.assertEqual(choices_to_dict(response.data.get('virtual-machine:status')), VirtualMachineStatusChoices.as_dict())
|
||||
|
||||
# Interface
|
||||
self.assertEqual(choices_to_dict(response.data.get('interface:type')), VMInterfaceTypeChoices.as_dict())
|
||||
|
||||
|
||||
class ClusterTypeTest(APITestCase):
|
||||
|
||||
|
Reference in New Issue
Block a user