test_basic.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:pyfc4 作者: ghukill 项目源码 文件源码
def test_graph_parse(self):

        # collect graphs
        graphs = []
        # loop through Content-Types, save parsed graphs
        content_types = [
            'application/ld+json',
            'application/n-triples',
            'application/rdf+xml',
            'text/n3',
            'text/plain',
            'text/turtle'
        ]
        for content_type in content_types:
            logger.debug("testing parsing of Content-Type: %s" % content_type)
            foo = repo.get_resource('%s/foo' % testing_container_uri, response_format=content_type)
            # test that graph was parsed correctly
            assert type(foo.rdf.graph) == rdflib.graph.Graph


    # create child container foo/bar (basic container)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号