|
|
@@ -138,11 +138,6 @@ class SiteTestCase(TestCase):
|
|
|
params = {'contact_email': ['contact1@example.com', 'contact2@example.com']}
|
|
|
self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)
|
|
|
|
|
|
- def test_id__in(self):
|
|
|
- id_list = self.queryset.values_list('id', flat=True)[:2]
|
|
|
- params = {'id__in': ','.join([str(id) for id in id_list])}
|
|
|
- self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)
|
|
|
-
|
|
|
def test_status(self):
|
|
|
params = {'status': [SiteStatusChoices.STATUS_ACTIVE, SiteStatusChoices.STATUS_PLANNED]}
|
|
|
self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)
|
|
|
@@ -365,11 +360,6 @@ class RackTestCase(TestCase):
|
|
|
params = {'outer_unit': RackDimensionUnitChoices.UNIT_MILLIMETER}
|
|
|
self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)
|
|
|
|
|
|
- def test_id__in(self):
|
|
|
- id_list = self.queryset.values_list('id', flat=True)[:2]
|
|
|
- params = {'id__in': ','.join([str(id) for id in id_list])}
|
|
|
- self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)
|
|
|
-
|
|
|
def test_region(self):
|
|
|
regions = Region.objects.all()[:2]
|
|
|
params = {'region_id': [regions[0].pk, regions[1].pk]}
|
|
|
@@ -479,11 +469,6 @@ class RackReservationTestCase(TestCase):
|
|
|
)
|
|
|
RackReservation.objects.bulk_create(reservations)
|
|
|
|
|
|
- def test_id__in(self):
|
|
|
- id_list = self.queryset.values_list('id', flat=True)[:2]
|
|
|
- params = {'id__in': ','.join([str(id) for id in id_list])}
|
|
|
- self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)
|
|
|
-
|
|
|
def test_site(self):
|
|
|
sites = Site.objects.all()[:2]
|
|
|
params = {'site_id': [sites[0].pk, sites[1].pk]}
|
|
|
@@ -631,11 +616,6 @@ class DeviceTypeTestCase(TestCase):
|
|
|
params = {'subdevice_role': SubdeviceRoleChoices.ROLE_PARENT}
|
|
|
self.assertEqual(self.filterset(params, self.queryset).qs.count(), 1)
|
|
|
|
|
|
- def test_id__in(self):
|
|
|
- id_list = self.queryset.values_list('id', flat=True)[:2]
|
|
|
- params = {'id__in': ','.join([str(id) for id in id_list])}
|
|
|
- self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)
|
|
|
-
|
|
|
def test_manufacturer(self):
|
|
|
manufacturers = Manufacturer.objects.all()[:2]
|
|
|
params = {'manufacturer_id': [manufacturers[0].pk, manufacturers[1].pk]}
|
|
|
@@ -1283,11 +1263,6 @@ class DeviceTestCase(TestCase):
|
|
|
params = {'vc_priority': [1, 2]}
|
|
|
self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)
|
|
|
|
|
|
- def test_id__in(self):
|
|
|
- id_list = self.queryset.values_list('id', flat=True)[:2]
|
|
|
- params = {'id__in': ','.join([str(id) for id in id_list])}
|
|
|
- self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)
|
|
|
-
|
|
|
def test_manufacturer(self):
|
|
|
manufacturers = Manufacturer.objects.all()[:2]
|
|
|
params = {'manufacturer_id': [manufacturers[0].pk, manufacturers[1].pk]}
|