root / rdfalchemy / trunk / test / joseki_test.py

Revision 103, 349 bytes (checked in by phil, 9 months ago)

Added Joseki unit test
Changed Literal to return strings for untyped Literals and string Literals

Line 
1from rdfalchemy.sparql import SPARQLGraph
2
3url = 'http://localhost:2020/books'
4g = SPARQLGraph(url)
5
6q1 = "select ?s ?p ?o where {?s ?p ?o}"
7
8responses = {}
9x = set(list(g.query(q1,resultMethod='xml')))
10j = set(list(g.query(q1,resultMethod='json')))
11
12print len(x)
13
14def sizes_test():
15    assert len(x) == len(j)
16
17
18def eq_jx_test():
19    assert j == x
Note: See TracBrowser for help on using the browser.