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")
评论列表
文章目录