<s> from rdflib import ConjunctiveGraph , plugin <EOL> from rdflib . store import Store <EOL> from StringIO import StringIO <EOL> import unittest <EOL> """<STR_LIT>""" <EOL> test_data = """<STR_LIT>""" <EOL> test_query = """<STR_LIT>""" <EOL> correct = """<STR_LIT>""" <EOL> test_header_query = """<STR_LIT>""" <EOL> class JSON ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . graph = ConjunctiveGraph ( plugin . get ( '<STR_LIT>' , Store ) ( ) ) <EOL> self . graph . parse ( StringIO ( test_data ) , format = "<STR_LIT>" ) <EOL> def testComma ( self ) : <EOL> """<STR_LIT>""" <EOL> results = self . graph . query ( test_query ) <EOL> result_json = results . serialize ( format = '<STR_LIT>' ) <EOL> self . failUnless ( result_json . find ( correct ) > <NUM_LIT:0> ) <EOL> def testHeader ( self ) : <EOL> """<STR_LIT>""" <EOL> results = self . graph . query ( test_header_query ) <EOL> result_json = results . serialize ( format = '<STR_LIT>' ) <EOL> self . failUnless ( result_json . find ( '<STR_LIT>' ) == - <NUM_LIT:1> ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
