diff --git a/course_discovery/apps/course_metadata/management/commands/tests/test_populate_executive_education_data_csv.py b/course_discovery/apps/course_metadata/management/commands/tests/test_populate_executive_education_data_csv.py index 6fb210df9dd..a2b9728dc28 100644 --- a/course_discovery/apps/course_metadata/management/commands/tests/test_populate_executive_education_data_csv.py +++ b/course_discovery/apps/course_metadata/management/commands/tests/test_populate_executive_education_data_csv.py @@ -221,6 +221,12 @@ def test_skip_products_ingestion_if_variants_data_empty(self, mock_get_smarter_c ), ) + output_csv.seek(0) + with open(output_csv.name, 'r') as csv_file: + reader = csv.DictReader(csv_file) + # check for empty csv file + assert not any(reader) + @mock.patch('course_discovery.apps.course_metadata.utils.GetSmarterEnterpriseApiClient') def test_successful_file_data_population_with_getsmarter_flag_with_multiple_variants(self, mock_get_smarter_client): """