diff --git a/netbox/dcim/tests/test_api.py b/netbox/dcim/tests/test_api.py index 8dfb90482..542040efc 100644 --- a/netbox/dcim/tests/test_api.py +++ b/netbox/dcim/tests/test_api.py @@ -1149,7 +1149,7 @@ class InventoryItemTemplateTest(APIViewTestCases.APIViewTestCase): class DeviceRoleGroupTest(APIViewTestCases.APIViewTestCase): model = DeviceRoleGroup - brief_fields = ['_depth', 'description', 'display', 'id', 'name', 'slug', 'role_count', 'url'] + brief_fields = ['_depth', 'description', 'display', 'id', 'name', 'role_count', 'slug', 'url'] bulk_update_data = { 'description': 'New description', 'comments': 'New Comment', diff --git a/netbox/dcim/tests/test_filtersets.py b/netbox/dcim/tests/test_filtersets.py index d207734ea..a613b3052 100644 --- a/netbox/dcim/tests/test_filtersets.py +++ b/netbox/dcim/tests/test_filtersets.py @@ -2298,6 +2298,13 @@ class DeviceRoleTestCase(TestCase, ChangeLoggedFilterSetTests): params = {'vm_role': 'false'} self.assertEqual(self.filterset(params, self.queryset).qs.count(), 1) + def test_group(self): + group = DeviceRoleGroup.objects.all()[:2] + params = {'group_id': [group[0].pk, group[1].pk]} + self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2) + params = {'group': [group[0].slug, group[1].slug]} + self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2) + def test_description(self): params = {'description': ['foobar1', 'foobar2']} self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)