From: Diane Trout Date: Mon, 6 Apr 2015 21:53:19 +0000 (-0700) Subject: Missed a couple of smart_text wrappings of django test client response.content. X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=077d4d25b654553b1d6e39ed4982be953bbbc8bb Missed a couple of smart_text wrappings of django test client response.content. (it comes back as bytes in python3, which causes trouble for librdf) --- diff --git a/inventory/test_inventory.py b/inventory/test_inventory.py index 9967d44..34aa006 100644 --- a/inventory/test_inventory.py +++ b/inventory/test_inventory.py @@ -36,9 +36,10 @@ class InventoryTestCase(TestCase): password=self.password)) response = self.client.get(url) self.failUnlessEqual(response.status_code, 200) + content = smart_text(response.content) model = get_model() - load_string_into_model(model, 'rdfa', smart_text(response.content), url) + load_string_into_model(model, 'rdfa', content, url) itemNode = RDF.Node(RDF.Uri(url)) item_type = fromTypedNode( @@ -134,7 +135,8 @@ class InventoryTestCase(TestCase): response = self.client.get(url) self.failUnlessEqual(response.status_code, 200) - load_string_into_model(model, 'rdfa', response.content, rootNode.uri) + content = smart_text(response.content) + load_string_into_model(model, 'rdfa', content, rootNode.uri) targets = model.get_targets(diskNode, libraryOntology['flowcell_id']) flowcells = [ str(x.uri) for x in targets] return flowcells