def testTasks(self): self._Set200ReturnValue() response = swarming_service.Bot('bot_id').Tasks() self._Assert200Response(response) self._AssertRequestMade('bot/bot_id/tasks', 'GET')
def testGet(self): self._Set200ReturnValue() response = swarming_service.Bot('bot_id').Get() self._Assert200Response(response) self._AssertRequestMade('bot/bot_id/get', 'GET')
def testBotGet(self): self._Set500ReturnValue() with self.assertRaises(swarming_service.SwarmingError): swarming_service.Bot('bot_id').Get() self._AssertRequestMade('bot/bot_id/get', 'GET')
def testTasks(self): response = swarming_service.Bot('bot_id').Tasks() self._AssertCorrectResponse(response) self._AssertRequestMadeOnce('bot/bot_id/tasks')
def testGet(self): response = swarming_service.Bot('bot_id').Get() self._AssertCorrectResponse(response) self._AssertRequestMadeOnce('bot/bot_id/get')
def testRetryHttpException(self): return_value = ({'status': '200'}, json.dumps({'content': {}})) self._SetSideEffect((httplib.HTTPException, return_value)) response = swarming_service.Bot('bot_id').Get() self._Assert200Response(response)