Merge pull request #21301 from edx/feanil/fix_test_collection
Fix some test collection in python 3.
This commit is contained in:
@@ -19,7 +19,7 @@ from opaque_keys.edx.keys import AssetKey, CourseKey
|
||||
from pymongo import ASCENDING, DESCENDING
|
||||
from six import text_type
|
||||
|
||||
from contentstore.utils import reverse_course_url
|
||||
from ..utils import reverse_course_url
|
||||
from contentstore.views.exception import AssetNotFoundException, AssetSizeTooLargeException
|
||||
from edxmako.shortcuts import render_to_response
|
||||
from openedx.core.djangoapps.contentserver.caching import del_cached_content
|
||||
|
||||
@@ -10,7 +10,6 @@ import re
|
||||
from contextlib import contextmanager
|
||||
from datetime import datetime
|
||||
from functools import wraps
|
||||
from StringIO import StringIO
|
||||
|
||||
import dateutil.parser
|
||||
import ddt
|
||||
@@ -1417,7 +1416,7 @@ class VideoUrlsCsvTestCase(VideoUploadTestMixin, CourseTestCase):
|
||||
response["Content-Disposition"],
|
||||
u"attachment; filename={course}_video_urls.csv".format(course=self.course.id.course)
|
||||
)
|
||||
response_reader = StringIO(response.content)
|
||||
response_reader = six.StringIO(response.content)
|
||||
reader = csv.DictReader(response_reader, dialect=csv.excel)
|
||||
self.assertEqual(
|
||||
reader.fieldnames,
|
||||
|
||||
@@ -61,7 +61,6 @@ import hashlib
|
||||
import logging
|
||||
from collections import defaultdict
|
||||
from importlib import import_module
|
||||
from types import NoneType
|
||||
|
||||
import six
|
||||
from bson.objectid import ObjectId
|
||||
@@ -2108,7 +2107,7 @@ class SplitMongoModuleStore(SplitBulkWriteMixin, ModuleStoreWriteBase):
|
||||
Broke out guts of update_item for short-circuited internal use only
|
||||
"""
|
||||
with self.bulk_operations(course_key):
|
||||
if allow_not_found and isinstance(block_key.id, (LocalId, NoneType)):
|
||||
if allow_not_found and isinstance(block_key.id, (LocalId, type(None))):
|
||||
fields = {}
|
||||
for subfields in six.itervalues(partitioned_fields):
|
||||
fields.update(subfields)
|
||||
|
||||
Reference in New Issue
Block a user