示例#1
0
    def __init__(self, *args, **kwargs):
        from ereports.engine.registry import registry
        super(ReportConfigurationForm, self).__init__(*args, **kwargs)

        self.fields['report_class'].choices = registry.choices()
示例#2
0
    def __init__(self, *args, **kwargs):
        from ereports.engine.registry import registry
        super(ReportConfigurationForm, self).__init__(*args, **kwargs)

        self.fields['report_class'].choices = registry.choices()
示例#3
0
 def test_init(self):
     form = ReportConfigurationForm()
     self.assertIsInstance(form.fields['report_class'], ChoiceField)
     self.assertEqual(form.fields['report_class'].choices,
                      registry.choices())
示例#4
0
 def test_init(self):
     form = ReportConfigurationForm()
     self.assertIsInstance(form.fields["report_class"], ChoiceField)
     self.assertEqual(form.fields["report_class"].choices, registry.choices())