From 8ef8dd27b2d5de65fbc693676f7a6e94d3264745 Mon Sep 17 00:00:00 2001 From: amitvadhel Date: Fri, 10 May 2019 12:54:01 +0300 Subject: [PATCH] INCR-139: Run python-modernize on common/djangoapps/third_party_auth/tests [tests, data] --- .../tests/data/saml_identity_provider_mock_data.py | 2 ++ common/djangoapps/third_party_auth/tests/specs/base.py | 1 + common/djangoapps/third_party_auth/tests/specs/test_azuread.py | 1 + common/djangoapps/third_party_auth/tests/specs/test_generic.py | 2 ++ common/djangoapps/third_party_auth/tests/specs/test_google.py | 2 ++ common/djangoapps/third_party_auth/tests/specs/test_linkedin.py | 1 + common/djangoapps/third_party_auth/tests/specs/test_lti.py | 2 ++ common/djangoapps/third_party_auth/tests/specs/test_testshib.py | 2 ++ common/djangoapps/third_party_auth/tests/specs/test_twitter.py | 1 + 9 files changed, 14 insertions(+) diff --git a/common/djangoapps/third_party_auth/tests/data/saml_identity_provider_mock_data.py b/common/djangoapps/third_party_auth/tests/data/saml_identity_provider_mock_data.py index bcadd2eb2e..7100dc9d3f 100644 --- a/common/djangoapps/third_party_auth/tests/data/saml_identity_provider_mock_data.py +++ b/common/djangoapps/third_party_auth/tests/data/saml_identity_provider_mock_data.py @@ -1,5 +1,7 @@ """Mock data for SAMLIdentityProvider""" +from __future__ import absolute_import + from social_core.backends.saml import OID_MAIL, OID_GIVEN_NAME, OID_SURNAME, OID_COMMON_NAME, OID_USERID expected_user_details = { diff --git a/common/djangoapps/third_party_auth/tests/specs/base.py b/common/djangoapps/third_party_auth/tests/specs/base.py index ef1da454fa..4c911f7233 100644 --- a/common/djangoapps/third_party_auth/tests/specs/base.py +++ b/common/djangoapps/third_party_auth/tests/specs/base.py @@ -1,6 +1,7 @@ """ Base integration test for provider implementations. """ +from __future__ import absolute_import import json import unittest diff --git a/common/djangoapps/third_party_auth/tests/specs/test_azuread.py b/common/djangoapps/third_party_auth/tests/specs/test_azuread.py index 1cf21d5a8e..b3d807a2ae 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_azuread.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_azuread.py @@ -1,4 +1,5 @@ """Integration tests for Azure Active Directory / Microsoft Account provider.""" +from __future__ import absolute_import from third_party_auth.tests.specs import base diff --git a/common/djangoapps/third_party_auth/tests/specs/test_generic.py b/common/djangoapps/third_party_auth/tests/specs/test_generic.py index e726349ba0..b0c7cb3968 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_generic.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_generic.py @@ -1,6 +1,8 @@ """ Use the 'Dummy' auth provider for generic integration tests of third_party_auth. """ +from __future__ import absolute_import + import unittest from third_party_auth.tests import testutil diff --git a/common/djangoapps/third_party_auth/tests/specs/test_google.py b/common/djangoapps/third_party_auth/tests/specs/test_google.py index d3dd6eeb7b..db8661810e 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_google.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_google.py @@ -1,4 +1,6 @@ """Integration tests for Google providers.""" +from __future__ import absolute_import + import base64 import hashlib import hmac diff --git a/common/djangoapps/third_party_auth/tests/specs/test_linkedin.py b/common/djangoapps/third_party_auth/tests/specs/test_linkedin.py index 700c22ff86..ac4f47d895 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_linkedin.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_linkedin.py @@ -1,4 +1,5 @@ """Integration tests for LinkedIn providers.""" +from __future__ import absolute_import from third_party_auth.tests.specs import base diff --git a/common/djangoapps/third_party_auth/tests/specs/test_lti.py b/common/djangoapps/third_party_auth/tests/specs/test_lti.py index dc0fe934f7..cd364dae35 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_lti.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_lti.py @@ -1,6 +1,8 @@ """ Integration tests for third_party_auth LTI auth providers """ +from __future__ import absolute_import + import unittest from django.conf import settings from django.contrib.auth.models import User diff --git a/common/djangoapps/third_party_auth/tests/specs/test_testshib.py b/common/djangoapps/third_party_auth/tests/specs/test_testshib.py index ec6ba70da7..eec6ca7bb8 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_testshib.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_testshib.py @@ -1,6 +1,8 @@ """ Third_party_auth integration tests using a mock version of the TestShib provider """ +from __future__ import absolute_import + import datetime import json import logging diff --git a/common/djangoapps/third_party_auth/tests/specs/test_twitter.py b/common/djangoapps/third_party_auth/tests/specs/test_twitter.py index 4e09cea505..3522fd8e90 100644 --- a/common/djangoapps/third_party_auth/tests/specs/test_twitter.py +++ b/common/djangoapps/third_party_auth/tests/specs/test_twitter.py @@ -1,6 +1,7 @@ """ Separate integration test for Twitter which is an OAuth1 provider. """ +from __future__ import absolute_import from mock import patch from third_party_auth.tests.specs import base