Factory Boy random choice for a field with field option "choices"
Factory Boy random choice for a field with field option "choices" Question: When a field in a Django model has the option choices, see Django choices field option, it utilises an iterable containing iterables of 2 items to define which values are allowed. For example: Models class IceCreamProduct(models.Model): PRODUCT_TYPES = ( (0, ‘Soft Ice Cream’), …