Skip to content

Commit

Permalink
chore: remove some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AfaqShuaib09 committed Dec 8, 2024
1 parent bd53de5 commit 8ed06a1
Showing 1 changed file with 2 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
from course_discovery.apps.course_metadata.models import Course, CourseRun
from course_discovery.apps.course_metadata.tests.factories import CSVDataLoaderConfigurationFactory
from course_discovery.apps.course_metadata.toggles import (
IS_SUBDIRECTORY_SLUG_FORMAT_ENABLED, IS_SUBDIRECTORY_SLUG_FORMAT_FOR_EXEC_ED_ENABLED,
IS_COURSE_RUN_VARIANT_ID_EDITABLE
IS_SUBDIRECTORY_SLUG_FORMAT_ENABLED, IS_SUBDIRECTORY_SLUG_FORMAT_FOR_EXEC_ED_ENABLED
)

LOGGER_PATH = 'course_discovery.apps.course_metadata.management.commands.import_course_metadata'
Expand All @@ -40,44 +39,12 @@ def setUp(self) -> None:
self.client.login(username=self.user.username, password=USER_PASSWORD)
csv_file_content = ','.join(list(mock_data.VALID_COURSE_AND_COURSE_RUN_CSV_DICT)) + '\n'
csv_file_content += ','.join(f'"{key}"' for key in list(
mock_data.VALID_COURSE_AND_COURSE_RUN_CSV_DICT.values())) + '\n'
mock_data.VALID_COURSE_AND_COURSE_RUN_CSV_DICT.values()))
self.csv_file = SimpleUploadedFile(
name='test.csv',
content=csv_file_content.encode('utf-8'),
content_type='text/csv'
)
mocked_data = mock_data.VALID_COURSE_AND_COURSE_RUN_CSV_DICT
mocked_data.update(
{
"publish_date": "01/26/2022",
"start_date": "01/25/2022",
"start_time": "00:00",
"end_date": "02/25/2055",
"end_time": "00:00",
"reg_close_date": "01/25/2055",
"reg_close_time": "00:00",
"course_pacing": "self-paced",
"course_run_enrollment_track": "Paid Executive Education",
"staff": "staff_1,staff_2",
"minimum_effort": "4",
"maximum_effort": "10",
"length": "10",
"content_language": "English - United States",
"transcript_language": "English - Great Britain",
"expected_program_type": "professional-certificate",
"expected_program_name": "New Program for all",
"upgrade_deadline_override_date": "01/25/2024",
"upgrade_deadline_override_time": "00:00",
'variant_id': "00000000-0000-0000-0000-000000000011",
}
)
csv_file_content += ','.join(f'"{key}"' for key in list(
mocked_data.values()))
self.csv_file_1 = SimpleUploadedFile(
name='test1.csv',
content=csv_file_content.encode('utf-8'),
content_type='text/csv'
)

def mock_call_course_api(self, method, url, data):
"""
Expand Down

0 comments on commit 8ed06a1

Please sign in to comment.