test_client.py 文件源码

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

项目:aiosparql 作者: aio-libs 项目源码 文件源码
def test_get(self):
        async with self.client.get(format="some/format") as response:
            self.assertIsInstance(response, aiohttp.ClientResponse)
        self.assertEqual(self.app['last_request'].method, "GET")
        self.assertEqual(self.app['last_request'].query_string,
                         "graph=%s" % self.client_kwargs['graph'].value)
        self.assertEqual(self.app['last_request'].headers['Accept'],
                         "some/format")

        async with self.client.get(format="some/format", graph=IRI("foo")) \
                as response:
            self.assertIsInstance(response, aiohttp.ClientResponse)
        self.assertEqual(self.app['last_request'].method, "GET")
        self.assertEqual(self.app['last_request'].query_string, "graph=foo")
        self.assertEqual(self.app['last_request'].headers['Accept'],
                         "some/format")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号