#3892: Convert CABLE_TERMINATION_TYPES to a Q object

This commit is contained in:
Jeremy Stretch
2020-01-15 15:51:51 -05:00
parent b98ac64ac2
commit f8dad1744c
6 changed files with 48 additions and 15 deletions

View File

@@ -30,7 +30,7 @@ class ChoicesTest(APITestCase):
# Cable
self.assertEqual(choices_to_dict(response.data.get('cable:length_unit')), CableLengthUnitChoices.as_dict())
self.assertEqual(choices_to_dict(response.data.get('cable:status')), CableStatusChoices.as_dict())
content_types = ContentType.objects.filter(model__in=CABLE_TERMINATION_TYPES)
content_types = ContentType.objects.filter(CABLE_TERMINATION_MODELS)
cable_termination_choices = {
"{}.{}".format(ct.app_label, ct.model): ct.name for ct in content_types
}