1
0
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:
Jeremy Stretch
2020-01-15 10:04:12 -05:00
parent 49f027fae7
commit c202c1325b

View File

@ -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):