def test_get(self): G(ReportConfiguration, name='Standard', published=True) response = ReportIndex.as_view()(self.request) self.assertIn('reports', response.context_data) self.assertEqual(len(response.context_data['reports']), 1)
def test_get_no_reports(self): response = ReportIndex.as_view()(self.request) self.assertIn('reports', response.context_data) self.assertEqual(response.context_data['reports'], [])