Fix some minor issues that prevent some tests from being collected.
This commit is contained in:
@@ -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