def test_summarize_reports_empty_list(self, mock_update_summary): """ Test that the summarize_reports task is called when empty processing list is provided. """ mock_update_summary.delay = Mock() summarize_reports([]) mock_update_summary.delay.assert_not_called()
def test_summarize_reports_processing_list(self, mock_update_summary): """Test that the summarize_reports task is called when a processing list is provided.""" mock_update_summary.delay = Mock() report_meta = {} report_meta["start_date"] = str(DateAccessor().today()) report_meta["schema_name"] = self.schema report_meta["provider_type"] = Provider.PROVIDER_OCP report_meta["provider_uuid"] = self.ocp_test_provider_uuid report_meta["manifest_id"] = 1 reports_to_summarize = [report_meta] summarize_reports(reports_to_summarize) mock_update_summary.delay.assert_called()