Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS * Generate common/djangoapps import shims for Studio * Stop appending project root to sys.path * Stop appending common/djangoapps to sys.path * Import from common.djangoapps.course_action_state instead of course_action_state * Import from common.djangoapps.course_modes instead of course_modes * Import from common.djangoapps.database_fixups instead of database_fixups * Import from common.djangoapps.edxmako instead of edxmako * Import from common.djangoapps.entitlements instead of entitlements * Import from common.djangoapps.pipline_mako instead of pipeline_mako * Import from common.djangoapps.static_replace instead of static_replace * Import from common.djangoapps.student instead of student * Import from common.djangoapps.terrain instead of terrain * Import from common.djangoapps.third_party_auth instead of third_party_auth * Import from common.djangoapps.track instead of track * Import from common.djangoapps.util instead of util * Import from common.djangoapps.xblock_django instead of xblock_django * Add empty common/djangoapps/__init__.py to fix pytest collection * Fix pylint formatting violations * Exclude import_shims/ directory tree from linting
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
from rest_framework import serializers
|
||||
|
||||
from third_party_auth.models import SAMLProviderData
|
||||
from common.djangoapps.third_party_auth.models import SAMLProviderData
|
||||
|
||||
|
||||
class SAMLProviderDataSerializer(serializers.ModelSerializer):
|
||||
|
||||
@@ -13,11 +13,11 @@ from rest_framework.test import APITestCase
|
||||
from enterprise.models import EnterpriseCustomer, EnterpriseCustomerIdentityProvider
|
||||
from enterprise.constants import ENTERPRISE_ADMIN_ROLE, ENTERPRISE_LEARNER_ROLE
|
||||
|
||||
from third_party_auth.tests import testutil
|
||||
from third_party_auth.models import SAMLProviderData, SAMLProviderConfig
|
||||
from third_party_auth.tests.samlutils import set_jwt_cookie
|
||||
from third_party_auth.tests.utils import skip_unless_thirdpartyauth
|
||||
from third_party_auth.utils import convert_saml_slug_provider_id
|
||||
from common.djangoapps.third_party_auth.tests import testutil
|
||||
from common.djangoapps.third_party_auth.models import SAMLProviderData, SAMLProviderConfig
|
||||
from common.djangoapps.third_party_auth.tests.samlutils import set_jwt_cookie
|
||||
from common.djangoapps.third_party_auth.tests.utils import skip_unless_thirdpartyauth
|
||||
from common.djangoapps.third_party_auth.utils import convert_saml_slug_provider_id
|
||||
|
||||
SINGLE_PROVIDER_CONFIG = {
|
||||
'entity_id': 'http://entity-id-1',
|
||||
|
||||
@@ -11,7 +11,7 @@ from rest_framework.authentication import SessionAuthentication
|
||||
from rest_framework.exceptions import ParseError
|
||||
|
||||
from enterprise.models import EnterpriseCustomerIdentityProvider
|
||||
from third_party_auth.utils import validate_uuid4_string, convert_saml_slug_provider_id
|
||||
from common.djangoapps.third_party_auth.utils import validate_uuid4_string, convert_saml_slug_provider_id
|
||||
|
||||
from ..models import SAMLProviderConfig, SAMLProviderData
|
||||
from .serializers import SAMLProviderDataSerializer
|
||||
|
||||
Reference in New Issue
Block a user