Пример #1
0
 def test_get_filters_summary_filterspec(self):
     r = FilterSpecDemoReport.as_report()
     form = reportform_factory(r, (r.config_form_class,))()
     form.cleaned_data = {
         'date_range': FilterSpec('2001')
     }
     self.assertEqual(form.get_filters_summary(), {u'Date Range': '2001'})
Пример #2
0
 def test_get_filters_filterspec(self):
     r = FilterSpecDemoReport.as_report()
     form = reportform_factory(r, (r.config_form_class,))()
     form.cleaned_data = {
         'date_range': FilterSpec('2001')
     }
     f = form.get_filters()
     self.assertSequenceEqual((['2001'], {}), f)