'test to generate executive summary report
and then test the report authenticity.'

@patch.dict('django.conf.settings.FEATURES', {'ENABLE_PAID_COURSE_REGISTRATION': True})
def test_generate_executive_summary_report(self):

    self.students_purchases()
    task_input = {'features': []}
    with patch('lms.djangoapps.instructor_task.tasks_helper.runner._get_current_task'):
        result = upload_exec_summary_report(None, None, self.course.id, task_input, 'generating    executive    summary    report')
    report_store = ReportStore.from_config(config_name='FINANCIAL_REPORTS')
    expected_data = ['Gross    Revenue    Collected', '$1481.82', 'Gross    Revenue    Pending', '$0.00', 'Average    Price    per    Seat', '$296.36', 'Number    of    seats    purchased    using    coupon    codes', '<td>2</td>']
    self.assertDictContainsSubset({'attempted': 1, 'succeeded': 1, 'failed': 0}, result)
    self._verify_html_file_report(report_store, expected_data)
