From f5fbf0b22a16ddb2078e65c88be9971433d41cdc Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Wed, 16 May 2012 09:48:29 -0700 Subject: [PATCH] Tweak some test code to work with librdf 1.0.10 --- htsworkflow/util/test/test_rdfhelp.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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