1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #3092: Split DCIM models into separate files for easier management

This commit is contained in:
Jeremy Stretch
2020-01-10 14:22:22 -05:00
parent 9f627fd0d3
commit ca13045515
4 changed files with 1471 additions and 1368 deletions

View File

@@ -1,5 +1,8 @@
from django.core.exceptions import ValidationError
from django.test import TestCase
from dcim.choices import *
from dcim.constants import CONNECTION_STATUS_CONNECTED, CONNECTION_STATUS_PLANNED
from dcim.models import *
from tenancy.models import Tenant
@@ -498,7 +501,7 @@ class CablePathTestCase(TestCase):
self.assertEqual(interface1.connection_status, CONNECTION_STATUS_PLANNED)
# Switch third segment from planned to connected
cable3.status = CONNECTION_STATUS_CONNECTED
cable3.status = CableStatusChoices.STATUS_CONNECTED
cable3.save()
interface1 = Interface.objects.get(pk=self.interface1.pk)
self.assertEqual(interface1.connected_endpoint, self.interface2)