Missed a couple of smart_text wrappings of django test client response.content.
authorDiane Trout <diane@ghic.org>
Mon, 6 Apr 2015 21:53:19 +0000 (14:53 -0700)
committerDiane Trout <diane@ghic.org>
Mon, 6 Apr 2015 21:53:19 +0000 (14:53 -0700)
(it comes back as bytes in python3, which causes trouble for librdf)

inventory/test_inventory.py

index 9967d4411df4de916cf51b5763396daa636a9f79..34aa0068d9c214766274e1b29522563888563326 100644 (file)
@@ -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