def test_apibase_instantiation(self): controller = '10.10.10.10' token = XAuthToken('10.10.10.10', 'sdn', 'skyline') rest_client = RestClient(token) apibase = ApiBase(controller, rest_client) self.assertEqual(apibase.controller, controller) self.assertEqual(apibase.rest_client, rest_client)
def setUp(self): self.auth = XAuthToken('10.10.10.10', 'sdn', 'skyline') self.client = RestClient(self.auth) response_ok = requests.Response() response_ok.status_code = 200 self.response_ok = response_ok
def __init__(self, controller, auth): self.restclient = RestClient(auth) super(Api, self).__init__(controller, self.restclient)