async def test_create_response(self):
     task = Task.current_task(loop=self.loop)
     task.session = {}
     task.endpoint_desc = {}
     task.request_params = {}
     response = self.service_client.create_response(method='get', url=URL("http://test.com"),
                                                    writer=None, continue100=False, timer=None,
                                                    request_info=RequestInfo(URL("http://test.com"), 'get', []),
                                                    auto_decompress=False,
                                                    traces=[], loop=self.loop, session=self.service_client.session)
     self.assertIsInstance(response, ObjectWrapper)
Пример #2
0
 def current_task():
     return Task.current_task()
Пример #3
0
 def test_identfy_current_task(self):
     self.assertEqual(id(Task.current_task()), identify_future())
Пример #4
0
 def test_identfy_current_task(self):
     self.assertEqual(id(Task.current_task()), identify_future())