diff --git a/lms/djangoapps/learner_home/test_serializers.py b/lms/djangoapps/learner_home/test_serializers.py index 14383946cb51..e7d22d5e71e2 100644 --- a/lms/djangoapps/learner_home/test_serializers.py +++ b/lms/djangoapps/learner_home/test_serializers.py @@ -522,9 +522,12 @@ def test_with_data(self): # ... with a certificate input_context = self.create_test_context(input_data.course) - # ... and some data preemptively gathered + # ... and some data preemptively gathered, including a certificate display behavior available_date = random_date() input_data.course.certificate_available_date = available_date + input_data.course.certificates_display_behavior = ( + CertificatesDisplayBehaviors.END_WITH_DATE + ) cert_url = input_context["cert_statuses"][input_data.course.id][ "cert_web_view_url" ] diff --git a/openedx/core/djangoapps/models/tests/test_course_details.py b/openedx/core/djangoapps/models/tests/test_course_details.py index a2d9982a6242..41e739ecb4c8 100644 --- a/openedx/core/djangoapps/models/tests/test_course_details.py +++ b/openedx/core/djangoapps/models/tests/test_course_details.py @@ -8,7 +8,6 @@ import pytest import ddt from pytz import UTC -from unittest.mock import patch # lint-amnesty, pylint: disable=wrong-import-order from django.conf import settings from xmodule.modulestore import ModuleStoreEnum