Skip to content

Commit ef5f9dc

Browse files
authored
fix: ingestion email for course run rerun info (#4205)
1 parent b59cb2f commit ef5f9dc

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

course_discovery/apps/course_metadata/data_loaders/csv_loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ def _register_successful_ingestion(
418418
'uuid': course_uuid,
419419
'external_course_marketing_type': external_course_marketing_type,
420420
'url_slug': active_url_slug,
421-
're-run': is_course_run_created
421+
'rerun': is_course_run_created
422422
}
423423
)
424424
else:

course_discovery/apps/course_metadata/data_loaders/tests/test_csv_loader.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def test_single_valid_row(self, csv_slug, expected_slug, jwt_decode_patch): # p
261261
'uuid': str(course.uuid),
262262
'external_course_marketing_type': 'short_course',
263263
'url_slug': expected_slug,
264-
're-run': True
264+
'rerun': True
265265
}],
266266
'archived_products_count': 0,
267267
'archived_products': [],
@@ -343,7 +343,7 @@ def test_archived_flow_published_course(self, jwt_decode_patch): # pylint: disa
343343
'uuid': str(course.uuid),
344344
'external_course_marketing_type': 'short_course',
345345
'url_slug': 'csv-course',
346-
're-run': True
346+
'rerun': True
347347
}],
348348
'archived_products_count': 2,
349349
'errors': loader.error_logs
@@ -543,7 +543,7 @@ def test_ingest_flow_for_preexisting_published_course_with_new_run_creation(self
543543
'external_course_marketing_type':
544544
course.additional_metadata.external_course_marketing_type,
545545
'url_slug': course.active_url_slug,
546-
're-run': True
546+
'rerun': True
547547
}],
548548
'archived_products_count': 0,
549549
'archived_products': [],

course_discovery/apps/course_metadata/tests/test_emails.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ def test_email_new_products(self):
570570
'uuid': uuid,
571571
'external_course_marketing_type': None,
572572
'url_slug': url_slug,
573-
're-run': True,
573+
'rerun': True,
574574
}
575575
],
576576
}
@@ -584,7 +584,8 @@ def test_email_new_products(self):
584584
"<tr><th>New Products</th><td> 1 </td></tr>",
585585
"<tr><th>Updated Products</th><td> 0 </td></tr>",
586586
"<h3>New Products</h3>",
587-
f"<li><a href='{self.partner.publisher_url}courses/{uuid}'>{uuid}</a> - {url_slug} </li>"
587+
f"<li><a href='{self.partner.publisher_url}courses/{uuid}'>{uuid}</a> - {url_slug} "
588+
f"A new run has been created</li>"
588589
]
589590
)
590591

@@ -606,19 +607,19 @@ def test_email_new_exec_ed_products(self):
606607
'uuid': uuid,
607608
'external_course_marketing_type': 'sprint',
608609
'url_slug': url_slug,
609-
're-run': True
610+
'rerun': True
610611
},
611612
{
612613
'uuid': uuid,
613614
'external_course_marketing_type': 'course_stack',
614615
'url_slug': url_slug,
615-
're-run': True
616+
'rerun': True
616617
},
617618
{
618619
'uuid': uuid,
619620
'external_course_marketing_type': 'short_course',
620621
'url_slug': url_slug,
621-
're-run': True
622+
'rerun': True
622623
},
623624
],
624625
}
@@ -633,11 +634,11 @@ def test_email_new_exec_ed_products(self):
633634
"<tr><th>Updated Products</th><td> 0 </td></tr>",
634635
"<h3>New Products</h3>",
635636
f"<li><a href='{self.partner.publisher_url}courses/{uuid}'>{uuid}</a> - {url_slug} "
636-
f"(sprint) </li>"
637+
f"(sprint) A new run has been created</li>"
637638
f"<li><a href='{self.partner.publisher_url}courses/{uuid}'>{uuid}</a> - {url_slug} "
638-
f"(course_stack) </li>"
639+
f"(course_stack) A new run has been created</li>"
639640
f"<li><a href='{self.partner.publisher_url}courses/{uuid}'>{uuid}</a> - {url_slug} "
640-
f"(short_course) </li>"
641+
f"(short_course) A new run has been created</li>"
641642
]
642643
)
643644

0 commit comments

Comments
 (0)