From b816a5d0c6ca0fab2d11c926496e67304f1b39c3 Mon Sep 17 00:00:00 2001 From: Ryan Gillespie <24619595+nopg@users.noreply.github.com> Date: Thu, 23 May 2024 17:00:06 +0000 Subject: [PATCH] Fixes #15717: Allow VM with Site to Cluster without Site --- netbox/dcim/tests/test_models.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/netbox/dcim/tests/test_models.py b/netbox/dcim/tests/test_models.py index 4bb71643f..9056a66c0 100644 --- a/netbox/dcim/tests/test_models.py +++ b/netbox/dcim/tests/test_models.py @@ -564,30 +564,6 @@ class DeviceTestCase(TestCase): with self.assertRaises(ValidationError): Device(name='device1', site=sites[0], device_type=device_type, role=device_role, cluster=clusters[1]).full_clean() - def test_old_device_role_field(self): - """ - Ensure that the old device role field sets the value in the new role field. - """ - - # Test getter method - device = Device( - site=Site.objects.first(), - device_type=DeviceType.objects.first(), - role=DeviceRole.objects.first(), - name='Test Device 1', - device_role=DeviceRole.objects.first() - ) - device.full_clean() - device.save() - - self.assertEqual(device.role, device.device_role) - - # Test setter method - device.device_role = DeviceRole.objects.last() - device.full_clean() - device.save() - self.assertEqual(device.role, device.device_role) - class CableTestCase(TestCase):