def __init__(self, *args, **kwargs): from ereports.engine.registry import registry super(ReportConfigurationForm, self).__init__(*args, **kwargs) self.fields['report_class'].choices = registry.choices()
def __init__(self, *args, **kwargs): from ereports.engine.registry import registry super(ReportConfigurationForm, self).__init__(*args, **kwargs) self.fields['report_class'].choices = registry.choices()
def test_init(self): form = ReportConfigurationForm() self.assertIsInstance(form.fields['report_class'], ChoiceField) self.assertEqual(form.fields['report_class'].choices, registry.choices())
def test_init(self): form = ReportConfigurationForm() self.assertIsInstance(form.fields["report_class"], ChoiceField) self.assertEqual(form.fields["report_class"].choices, registry.choices())