Use django.utils.encode smart_text or smart_str for intelligent unicode handling
[htsworkflow.git] / htsworkflow / pipelines / test / test_retrieve_config.py
index 1b412c7d98832760cce6a9c4482638fe8b531508..ffb63dc0ac05afe3c191a8d37e653a8dbe03c8af 100644 (file)
@@ -9,6 +9,7 @@ except ImportError as e:
     import simplejson as json
 
 from django.test import TestCase
+from django.utils.encoding import smart_text
 
 from samples.samples_factory import LibraryFactory, LibraryTypeFactory, \
     MultiplexIndexFactory
@@ -33,7 +34,7 @@ class RetrieveTestCases(TestCase):
         flowcell_request = self.client.get('/experiments/config/FC12150/json',
                                            apidata)
         self.failUnlessEqual(flowcell_request.status_code, 200)
-        flowcell_info = json.loads(flowcell_request.content)['result']
+        flowcell_info = json.loads(smart_text(flowcell_request.content))['result']
 
         options = getCombinedOptions(['-f','FC12150','-g',os.getcwd()])
         genome_map = {library.library_species.scientific_name: '/tmp/build' }
@@ -71,7 +72,7 @@ class RetrieveTestCases(TestCase):
         url = '/experiments/config/%s/json' % (fcid,)
         flowcell_request = self.client.get(url, apidata)
         self.failUnlessEqual(flowcell_request.status_code, 200)
-        flowcell_info = json.loads(flowcell_request.content)['result']
+        flowcell_info = json.loads(smart_text(flowcell_request.content))['result']
 
         options = getCombinedOptions(['-f',fcid,'-g',os.getcwd(),])