Skip to content

Commit

Permalink
Remove decode, change stringio version
Browse files Browse the repository at this point in the history
  • Loading branch information
LePetitTim committed Jan 23, 2019
1 parent 3ddbed6 commit 8fa740e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mapentity/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import shutil
import time
from datetime import datetime
from io import StringIO
from StringIO import StringIO

import requests
from django.conf import settings
Expand Down Expand Up @@ -152,7 +152,7 @@ def test_no_html_in_csv(self):
self.assertEqual(response.get('Content-Type'), 'text/csv')

# Read the csv
lines = list(csv.reader(StringIO(response.content.decode('utf-8')), delimiter=','))
lines = list(csv.reader(StringIO(response.content), delimiter=','))

# There should be one more line in the csv than in the items: this is the header line
self.assertEqual(len(lines), self.model.objects.all().count() + 1)
Expand Down

0 comments on commit 8fa740e

Please sign in to comment.