class Fp17TreatmentCategory(models.EpisodeSubrecord): _is_singleton = True TREATMENT_CATEGORIES = enum("Band 1", "Band 2", "Band 3") treatment_category = fields.CharField(max_length=255, blank=True, null=True, choices=TREATMENT_CATEGORIES, verbose_name="Treatment category") urgent_treatment = fields.BooleanField(default=False, verbose_name="Urgent treatment") regulation_11_replacement_appliance = fields.BooleanField( default=False, verbose_name="Regulation 11 replacement appliance") prescription_only = fields.BooleanField(default=False, verbose_name="Prescription only") denture_repairs = fields.BooleanField(default=False, verbose_name="Denture repairs") bridge_repairs = fields.BooleanField(default=False, verbose_name="Bridge repairs") arrest_of_bleeding = fields.BooleanField(default=False, verbose_name="Arrest of bleeding") removal_of_sutures = fields.BooleanField(default=False, verbose_name="Removal of sutures") class Meta: verbose_name = "Treatment category"
def test_enum(self): choices = ( ('one', 'one'), ('2', '2'), ('III', 'III') ) self.assertEqual(choices, fields.enum('one', '2', 'III'))
def test_enum(self): choices = (('one', 'one'), ('2', '2'), ('III', 'III')) self.assertEqual(choices, fields.enum('one', '2', 'III'))