Migrating common/djangoapps/course_action_state

This commit is contained in:
Jolyon Bloomfield
2019-03-29 12:40:14 -07:00
parent 63f799ff8f
commit f7cb9641dd
5 changed files with 10 additions and 5 deletions

View File

@@ -1,8 +1,9 @@
"""
Model Managers for Course Actions
"""
from __future__ import absolute_import
import six
import traceback
from django.db import models, transaction
@@ -88,7 +89,7 @@ class CourseActionUIStateManager(CourseActionStateManager):
# update any additional fields in kwargs
if kwargs:
for key, value in kwargs.iteritems():
for key, value in six.iteritems(kwargs):
setattr(state_object, key, value)
state_object.save()

View File

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

View File

@@ -9,10 +9,10 @@ file and check it in at the same time as your model changes. To do that,
3. It adds the migration file to edx-platform/common/djangoapps/course_action_state/migrations/
"""
from __future__ import absolute_import
from django.contrib.auth.models import User
from django.db import models
from opaque_keys.edx.django.models import CourseKeyField
from course_action_state.managers import CourseActionStateManager, CourseRerunUIStateManager

View File

@@ -2,6 +2,9 @@
"""
Tests for basic common operations related to Course Action State managers
"""
from __future__ import absolute_import
from six.moves import range
from collections import namedtuple
from ddt import data, ddt

View File

@@ -2,6 +2,8 @@
Tests specific to the CourseRerunState Model and Manager.
"""
from __future__ import absolute_import
from django.test import TestCase
from opaque_keys.edx.locations import CourseLocator
from six import text_type