Esempio n. 1
0
 def test_request_with_timeout(self):
     api = API(TestSession())
     request = Request(api, 'test')
     first = yield from request(timeout=1)
     second = {'params': {},
               'timeout': 1,
               'method_name': 'test'
               }
     self.assertDictEqual(first, second)
Esempio n. 2
0
 async def test_request_with_args(self):
     api = API(TestSession())
     request = Request(api, 'test')
     first = await request(arg=1)
     second = {'params': {'arg': 1},
               'timeout': None,
               'method_name': 'test'
               }
     self.assertDictEqual(first, second)