Files
edx-platform/common/djangoapps/student/apps.py
Awais Qureshi 094573e901 BOM-2375-student-part2
pyupgrade in student app.
2021-03-10 16:17:22 +05:00

28 lines
807 B
Python

"""
Configuration for the ``student`` Django application.
"""
import os
from django.apps import AppConfig
class StudentConfig(AppConfig):
"""
Default configuration for the ``student`` application.
"""
name = 'common.djangoapps.student'
def ready(self):
# Connect signal handlers.
from .signals import receivers # pylint: disable=unused-import
# The django-simple-history model on CourseEnrollment creates performance
# problems in testing, we mock it here so that the mock impacts all tests.
if os.environ.get('DISABLE_COURSEENROLLMENT_HISTORY', False):
import common.djangoapps.student.models as student_models
from unittest.mock import MagicMock
student_models.CourseEnrollment.history = MagicMock()