diff --git a/lms/djangoapps/mobile_api/migrations/0001_initial.py b/lms/djangoapps/mobile_api/migrations/0001_initial.py index e5bff1cbe0..c70676df66 100644 --- a/lms/djangoapps/mobile_api/migrations/0001_initial.py +++ b/lms/djangoapps/mobile_api/migrations/0001_initial.py @@ -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): diff --git a/lms/djangoapps/mobile_api/migrations/0002_auto_20160406_0904.py b/lms/djangoapps/mobile_api/migrations/0002_auto_20160406_0904.py index 0aeac1331e..20103c8a16 100644 --- a/lms/djangoapps/mobile_api/migrations/0002_auto_20160406_0904.py +++ b/lms/djangoapps/mobile_api/migrations/0002_auto_20160406_0904.py @@ -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 diff --git a/lms/djangoapps/mobile_api/migrations/0003_ignore_mobile_available_flag.py b/lms/djangoapps/mobile_api/migrations/0003_ignore_mobile_available_flag.py index abfc30b8bc..5ce0250677 100644 --- a/lms/djangoapps/mobile_api/migrations/0003_ignore_mobile_available_flag.py +++ b/lms/djangoapps/mobile_api/migrations/0003_ignore_mobile_available_flag.py @@ -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): diff --git a/lms/djangoapps/mobile_api/tests/test_context_processor.py b/lms/djangoapps/mobile_api/tests/test_context_processor.py index 0426731823..08cedfeb22 100644 --- a/lms/djangoapps/mobile_api/tests/test_context_processor.py +++ b/lms/djangoapps/mobile_api/tests/test_context_processor.py @@ -1,6 +1,8 @@ """ Tests for Django template context processors. """ +from __future__ import absolute_import + from django.conf import settings from django.test import TestCase from django.test.client import RequestFactory diff --git a/lms/djangoapps/mobile_api/tests/test_decorator.py b/lms/djangoapps/mobile_api/tests/test_decorator.py index 62cf286365..fa9ee8598d 100644 --- a/lms/djangoapps/mobile_api/tests/test_decorator.py +++ b/lms/djangoapps/mobile_api/tests/test_decorator.py @@ -3,6 +3,8 @@ Tests for mobile API utilities. """ +from __future__ import absolute_import + import ddt from django.test import TestCase diff --git a/lms/djangoapps/mobile_api/tests/test_middleware.py b/lms/djangoapps/mobile_api/tests/test_middleware.py index 0d67c889e0..c698de698b 100644 --- a/lms/djangoapps/mobile_api/tests/test_middleware.py +++ b/lms/djangoapps/mobile_api/tests/test_middleware.py @@ -1,6 +1,8 @@ """ Tests for Version Based App Upgrade Middleware """ +from __future__ import absolute_import + from datetime import datetime import ddt diff --git a/lms/djangoapps/mobile_api/tests/test_milestones.py b/lms/djangoapps/mobile_api/tests/test_milestones.py index 9745b53b84..9515a25460 100644 --- a/lms/djangoapps/mobile_api/tests/test_milestones.py +++ b/lms/djangoapps/mobile_api/tests/test_milestones.py @@ -1,9 +1,12 @@ """ Milestone related tests for the mobile_api """ +from __future__ import absolute_import + +import six +from crum import set_current_request from django.conf import settings from mock import patch -from crum import set_current_request from courseware.access_response import MilestoneAccessError from courseware.tests.test_entrance_exam import add_entrance_exam_milestone, answer_entrance_exam_problem @@ -111,7 +114,7 @@ class MobileAPIMilestonesMixin(object): add_entrance_exam_milestone(self.course, self.entrance_exam) self.course.entrance_exam_minimum_score_pct = 0.50 - self.course.entrance_exam_id = unicode(self.entrance_exam.location) + self.course.entrance_exam_id = six.text_type(self.entrance_exam.location) self.store.update_item(self.course, self.user.id) def _add_prerequisite_course(self): diff --git a/lms/djangoapps/mobile_api/tests/test_mobile_platform.py b/lms/djangoapps/mobile_api/tests/test_mobile_platform.py index fd8f9822b3..d4ecd583e3 100644 --- a/lms/djangoapps/mobile_api/tests/test_mobile_platform.py +++ b/lms/djangoapps/mobile_api/tests/test_mobile_platform.py @@ -1,6 +1,8 @@ """ Tests for Platform against Mobile App Request """ +from __future__ import absolute_import + import ddt from django.test import TestCase diff --git a/lms/djangoapps/mobile_api/tests/test_model.py b/lms/djangoapps/mobile_api/tests/test_model.py index f293f08809..a28af09451 100644 --- a/lms/djangoapps/mobile_api/tests/test_model.py +++ b/lms/djangoapps/mobile_api/tests/test_model.py @@ -1,6 +1,8 @@ """ Tests for Mobile API Configuration Models """ +from __future__ import absolute_import + from datetime import datetime import ddt