Esempio n. 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()
Esempio n. 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()
Esempio n. 3
0
 def test_init(self):
     form = ReportConfigurationForm()
     self.assertIsInstance(form.fields['report_class'], ChoiceField)
     self.assertEqual(form.fields['report_class'].choices,
                      registry.choices())
Esempio n. 4
0
 def test_init(self):
     form = ReportConfigurationForm()
     self.assertIsInstance(form.fields["report_class"], ChoiceField)
     self.assertEqual(form.fields["report_class"].choices, registry.choices())