python 3 fixes
fixed test failures fixed test failures python 3 fixes fixed test failures fixed test failures changes made as suggested minor change
This commit is contained in:
@@ -168,7 +168,7 @@ class UniversalNewlineIterator(object):
|
||||
line = char
|
||||
yield self.sanitize(last_line)
|
||||
else:
|
||||
line += char
|
||||
line += six.text_type(char) if isinstance(char, int) else char
|
||||
buf = self.original_file.read(self.buffer_size)
|
||||
if not buf and line:
|
||||
yield self.sanitize(line)
|
||||
|
||||
@@ -5255,7 +5255,7 @@ class TestBulkCohorting(SharedModuleStoreTestCase):
|
||||
# this temporary file will be removed in `self.tearDown()`
|
||||
__, file_name = tempfile.mkstemp(suffix=suffix, dir=self.tempdir)
|
||||
with open(file_name, 'w') as file_pointer:
|
||||
file_pointer.write(csv_data.encode('utf-8'))
|
||||
file_pointer.write(csv_data)
|
||||
with open(file_name, 'r') as file_pointer:
|
||||
url = reverse('add_users_to_cohorts', kwargs={'course_id': text_type(self.course.id)})
|
||||
return self.client.post(url, {'uploaded-file': file_pointer})
|
||||
|
||||
Reference in New Issue
Block a user