BOM-2351: Removed unused imports from common/djangoapps/third_party_auth

This commit is contained in:
Jawayria
2021-02-12 14:00:39 +05:00
parent e505d99237
commit 310da0d6a7
12 changed files with 1 additions and 30 deletions

View File

@@ -10,7 +10,6 @@ from django.conf import settings
from django.test import RequestFactory, TestCase
from edx_rest_framework_extensions.auth.jwt.authentication import JwtAuthentication
from edx_rest_framework_extensions.auth.jwt.tests.utils import generate_jwt
from mock import patch # lint-amnesty, pylint: disable=unused-import
from rest_framework.authentication import SessionAuthentication
from rest_framework.response import Response
from rest_framework.views import APIView

View File

@@ -6,12 +6,10 @@ Decorators that can be used to interact with third_party_auth.
from functools import wraps
from django.conf import settings
from django.shortcuts import redirect # lint-amnesty, pylint: disable=unused-import
from django.utils.decorators import available_attrs
from six.moves.urllib.parse import urlencode, urlparse # lint-amnesty, pylint: disable=unused-import
from six.moves.urllib.parse import urlparse # lint-amnesty, pylint: disable=unused-import
from common.djangoapps.third_party_auth.models import LTIProviderConfig
from common.djangoapps.third_party_auth.provider import Registry # lint-amnesty, pylint: disable=unused-import
def xframe_allow_whitelisted(view_func):

View File

@@ -1,8 +1,6 @@
"""
Tests for SAMLConfiguration endpoints
"""
import unittest # lint-amnesty, pylint: disable=unused-import
from django.urls import reverse
from django.contrib.sites.models import Site
from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user
@@ -10,7 +8,6 @@ from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imp
from rest_framework import status
from rest_framework.test import APITestCase
from common.djangoapps.third_party_auth.models import SAMLConfiguration
from common.djangoapps.third_party_auth.tests import testutil # lint-amnesty, pylint: disable=unused-import
from common.djangoapps.third_party_auth.tests.utils import skip_unless_thirdpartyauth
SAML_CONFIGURATIONS = [
{

View File

@@ -1,8 +1,6 @@
"""
Tests for SAMLProviderConfig endpoints
"""
import unittest
import copy
from uuid import uuid4
from django.urls import reverse
@@ -16,7 +14,6 @@ from enterprise.models import EnterpriseCustomerIdentityProvider, EnterpriseCust
from enterprise.constants import ENTERPRISE_ADMIN_ROLE, ENTERPRISE_LEARNER_ROLE
from common.djangoapps.third_party_auth.tests.samlutils import set_jwt_cookie
from common.djangoapps.third_party_auth.models import SAMLProviderConfig, SAMLConfiguration
from common.djangoapps.third_party_auth.tests import testutil
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

View File

@@ -1,4 +1,3 @@
import unittest
import copy
import pytz
from uuid import uuid4
@@ -12,8 +11,6 @@ from rest_framework.test import APITestCase
from enterprise.models import EnterpriseCustomer, EnterpriseCustomerIdentityProvider
from enterprise.constants import ENTERPRISE_ADMIN_ROLE, ENTERPRISE_LEARNER_ROLE
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

View File

@@ -1,9 +1,6 @@
"""
Use the 'Dummy' auth provider for generic integration tests of third_party_auth.
"""
import unittest # lint-amnesty, pylint: disable=unused-import
from common.djangoapps.third_party_auth.tests import testutil
from common.djangoapps.third_party_auth.tests.utils import skip_unless_thirdpartyauth
from .base import IntegrationTestMixin

View File

@@ -7,7 +7,6 @@ import datetime
import json
import logging
import os
import unittest # lint-amnesty, pylint: disable=unused-import
from unittest import skip
import ddt

View File

@@ -2,9 +2,6 @@
Tests third_party_auth admin views
"""
import unittest # lint-amnesty, pylint: disable=unused-import
from django.contrib.admin.sites import AdminSite
from django.core.files.uploadedfile import SimpleUploadedFile
from django.forms import models

View File

@@ -2,11 +2,7 @@
Tests for third_party_auth decorators.
"""
import unittest # lint-amnesty, pylint: disable=unused-import
import ddt
from django.conf import settings # lint-amnesty, pylint: disable=unused-import
from django.http import HttpResponse
from django.test import RequestFactory

View File

@@ -3,8 +3,6 @@ Unit tests for the IdentityServer3 OAuth2 Backend
"""
import json
import ddt
import pytest # pylint: disable=unused-import
from common.djangoapps.third_party_auth.identityserver3 import IdentityServer3
from common.djangoapps.third_party_auth.tests import testutil
from common.djangoapps.third_party_auth.tests.utils import skip_unless_thirdpartyauth

View File

@@ -2,7 +2,6 @@
import json
import unittest # lint-amnesty, pylint: disable=unused-import
import ddt
import mock

View File

@@ -1,8 +1,5 @@
"""Unit tests for settings.py."""
import unittest # lint-amnesty, pylint: disable=unused-import
from mock import patch
from common.djangoapps.third_party_auth import provider, settings
from common.djangoapps.third_party_auth.tests import testutil