python3: get StringIO from six (#40911)
This commit is contained in:
parent
46478781cf
commit
a15b4cddbb
|
@ -1,7 +1,8 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import csv
|
||||
import StringIO
|
||||
|
||||
from django.utils.six import StringIO
|
||||
|
||||
from webtest import Upload
|
||||
|
||||
|
@ -30,7 +31,7 @@ def test_synchronize_federations(settings, app, nanterre_classic_family, admin):
|
|||
response = response.click('Rapport')
|
||||
|
||||
def check_csv_response(csv_response):
|
||||
reader = csv.DictReader(StringIO.StringIO(csv_response.content))
|
||||
reader = csv.DictReader(StringIO(csv_response.content))
|
||||
reader.fieldnames = reader.reader.next()
|
||||
rows = list(reader)
|
||||
|
||||
|
|
|
@ -17,13 +17,13 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import csv
|
||||
import StringIO
|
||||
|
||||
from django.core.files.storage import default_storage
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.conf import settings
|
||||
from django.db import DatabaseError
|
||||
from django.db.transaction import atomic
|
||||
from django.utils.six import StringIO
|
||||
|
||||
from zoo.zoo_meta.models import EntitySchema
|
||||
from zoo.zoo_data.models import Job, Entity, Transaction, Log
|
||||
|
@ -103,7 +103,7 @@ class SynchronizeFederationsImport(object):
|
|||
self.report('report')
|
||||
|
||||
def report(self, target):
|
||||
output_file = StringIO.StringIO()
|
||||
output_file = StringIO()
|
||||
writer = csv.writer(output_file)
|
||||
writer.writerow(['RSU ID', 'prenoms', 'nom de naissance',
|
||||
'nom d\'usage', 'application', 'federation', 'action'])
|
||||
|
|
Loading…
Reference in New Issue