From: Diane Trout Date: Wed, 16 May 2012 16:48:29 +0000 (-0700) Subject: Tweak some test code to work with librdf 1.0.10 X-Git-Tag: v0.5.5~26 X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=f5fbf0b22a16ddb2078e65c88be9971433d41cdc Tweak some test code to work with librdf 1.0.10 --- diff --git a/htsworkflow/util/test/test_rdfhelp.py b/htsworkflow/util/test/test_rdfhelp.py index 55f590f..4fe6769 100644 --- a/htsworkflow/util/test/test_rdfhelp.py +++ b/htsworkflow/util/test/test_rdfhelp.py @@ -129,7 +129,7 @@ try: @prefix rdfs: . @prefix owl: . -_:a owl:imports "{loc}extra.turtle" +_:a owl:imports "{loc}extra.turtle" . '''.format(loc=loc) load_string_into_model(model, 'turtle', fragment, loc) tc = RDF.Node(RDF.Uri('http://jumpgate.caltech.edu/wiki/TestCase')) @@ -146,7 +146,8 @@ _:a owl:imports "{loc}extra.turtle" hello_text) hello_str = RDF.Node(literal=hello_text, datatype=xsdNS['string'].uri) - self.failUnlessEqual(str(sanitize_literal(hello_str)), + hello_clean = sanitize_literal(hello_str) + self.failUnlessEqual(hello_clean.literal_value['string'], hello_text) def test_sanitize_literal_html(self): @@ -155,7 +156,7 @@ _:a owl:imports "{loc}extra.turtle" hello_node = RDF.Node(literal=hello, datatype=xsdNS['string'].uri) hello_sanitized = sanitize_literal(hello_node) - self.failUnlessEqual(str(hello_sanitized), + self.failUnlessEqual(hello_sanitized.literal_value['string'], hello_clean) hostile = "hi there