def test_api_providers_non_none_api_providers(self): r = nare.NvpGetApiProvidersRequestEventlet(self.client) r.value = Mock() r.value.body = """{ "results": [ { "roles": [ { "role": "api_provider", "listen_addr": "pssl:1.1.1.1:1" }]}]}""" r.successful = Mock(return_value=True) LOG.info('%s' % r.api_providers()) self.assertTrue(r.api_providers() is not None)
def test_api_providers_none_api_providers(self): r = nare.NvpGetApiProvidersRequestEventlet(self.client) r.successful = Mock(return_value=False) self.assertTrue(r.api_providers() is None)
def test_construct_eventlet_get_api_providers_request(self): r = nare.NvpGetApiProvidersRequestEventlet(self.client) self.assertTrue(r is not None)