def test_get_root_subject(): 'Tests the integrity of the get_root_subject() function' r = RDFParser(None, open('tests/resources/rdf/pass.rdf')) type_uri = r.uri('type') emtype = r.get_object(None, type_uri) assert emtype is not None emtype = r.get_object(r.get_root_subject(), type_uri) assert emtype is not None
def test_get_root_subject(): "Tests the integrity of the get_root_subject() function" r = RDFParser(_load_rdf("tests/resources/rdf/pass.rdf")) type_uri = r.uri("type") emtype = r.get_object(None, type_uri) assert emtype is not None emtype = r.get_object(r.get_root_subject(), type_uri) assert emtype is not None
def test_get_object(): """Tests the integrity of the get_object() and get_objects() functions.""" r = RDFParser(None, open('tests/resources/rdf/pass.rdf')) test_uri = r.uri('test') emtest = r.get_object(None, test_uri) assert emtest is not None emtests = r.get_objects(None, test_uri) assert len(emtests) == 3 assert emtests[0] == emtest
def test_get_object(): """"Tests the integrity of the get_object() and get_objects() functions.""" r = RDFParser(_load_rdf("tests/resources/rdf/pass.rdf")) test_uri = r.uri("test") emtest = r.get_object(None, test_uri) assert emtest is not None emtests = r.get_objects(None, test_uri) assert len(emtests) == 3 assert emtests[0] == emtest