|
|
@@ -2,7 +2,6 @@ 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
|
|
|
|
|
|
@@ -522,14 +521,14 @@ class CablePathTestCase(TestCase):
|
|
|
cable3.save()
|
|
|
interface1 = Interface.objects.get(pk=self.interface1.pk)
|
|
|
self.assertEqual(interface1.connected_endpoint, self.interface2)
|
|
|
- self.assertEqual(interface1.connection_status, CONNECTION_STATUS_PLANNED)
|
|
|
+ self.assertFalse(interface1.connection_status)
|
|
|
|
|
|
# Switch third segment from planned to connected
|
|
|
cable3.status = CableStatusChoices.STATUS_CONNECTED
|
|
|
cable3.save()
|
|
|
interface1 = Interface.objects.get(pk=self.interface1.pk)
|
|
|
self.assertEqual(interface1.connected_endpoint, self.interface2)
|
|
|
- self.assertEqual(interface1.connection_status, CONNECTION_STATUS_CONNECTED)
|
|
|
+ self.assertTrue(interface1.connection_status)
|
|
|
|
|
|
def test_path_teardown(self):
|
|
|
|
|
|
@@ -542,7 +541,7 @@ class CablePathTestCase(TestCase):
|
|
|
cable3.save()
|
|
|
interface1 = Interface.objects.get(pk=self.interface1.pk)
|
|
|
self.assertEqual(interface1.connected_endpoint, self.interface2)
|
|
|
- self.assertEqual(interface1.connection_status, CONNECTION_STATUS_CONNECTED)
|
|
|
+ self.assertTrue(interface1.connection_status)
|
|
|
|
|
|
# Remove a cable
|
|
|
cable2.delete()
|