run modernizer on djangoapps-credentials migration, test & setting (#20428)

This commit is contained in:
Mayank Jain
2019-05-07 01:51:50 -04:00
committed by Jeremy Bowman
parent 9010c78ebd
commit f7ed283e56
10 changed files with 22 additions and 15 deletions

View File

@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
from django.db import migrations, models

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
from django.db import migrations, models

View File

@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-08-17 18:14
from __future__ import unicode_literals
from __future__ import absolute_import, unicode_literals
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):

View File

@@ -1,12 +1,11 @@
"""Factories for generating fake credentials-related data."""
# pylint: disable=missing-docstring, invalid-name
from __future__ import absolute_import
import factory
from openedx.core.djangoapps.catalog.tests.factories import (
generate_course_run_key,
DictFactoryBase,
)
from openedx.core.djangoapps.catalog.tests.factories import DictFactoryBase, generate_course_run_key
class ProgramCredential(DictFactoryBase):

View File

@@ -1,5 +1,7 @@
"""Mixins for use during testing."""
from __future__ import absolute_import
from openedx.core.djangoapps.credentials.models import CredentialsApiConfig

View File

@@ -1,5 +1,7 @@
"""Tests for models supporting Credentials-related functionality."""
from __future__ import absolute_import
from django.test import TestCase, override_settings
from openedx.core.djangoapps.credentials.models import API_VERSION

View File

@@ -1,4 +1,6 @@
"""Tests covering Credentials signals."""
from __future__ import absolute_import
import ddt
import mock
from django.conf import settings
@@ -16,7 +18,6 @@ from student.tests.factories import UserFactory
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory as XModuleCourseFactory
SIGNALS_MODULE = 'openedx.core.djangoapps.credentials.signals'

View File

@@ -1,9 +1,11 @@
"""
Test credentials tasks
"""
from __future__ import absolute_import
import mock
from django.conf import settings
from django.test import override_settings, TestCase
from django.test import TestCase, override_settings
from openedx.core.djangolib.testing.utils import skip_unless_lms
from student.tests.factories import UserFactory

View File

@@ -1,18 +1,19 @@
"""Tests covering Credentials utilities."""
from __future__ import absolute_import
import uuid
from edx_oauth2_provider.tests.factories import ClientFactory
import mock
from edx_oauth2_provider.tests.factories import ClientFactory
from provider.constants import CONFIDENTIAL
from openedx.core.djangoapps.credentials.models import CredentialsApiConfig
from openedx.core.djangoapps.credentials.tests import factories
from openedx.core.djangoapps.credentials.tests.mixins import CredentialsApiConfigMixin
from openedx.core.djangoapps.credentials.utils import get_credentials
from openedx.core.djangoapps.credentials.tests import factories
from openedx.core.djangolib.testing.utils import CacheIsolationTestCase, skip_unless_lms
from student.tests.factories import UserFactory
UTILS_MODULE = 'openedx.core.djangoapps.credentials.utils'