Пример #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())