test_namespaces.py 文件源码

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

项目:fluiddb 作者: fluidinfo 项目源码 文件源码
def testVersionGets404(self):
        """
        Version numbers used to be able to be given in API calls, but are
        no longer supported.
        """
        version = 20100808

        URI = '%s/%d/%s/%s' % (
            self.endpoint,
            version,
            defaults.httpNamespaceCategoryName,
            defaults.adminUsername)

        headers = Headers({'accept': ['application/json']})

        agent = Agent(reactor)
        response = yield agent.request('GET', URI, headers)
        self.assertEqual(http.NOT_FOUND, response.code)


    # TODO: Add a test for a namespace that we don't have LIST perm on.
    # although that might be done in permissions.py when that finally gets
    # added.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号