コード例 #1
0
 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)
コード例 #2
0
 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)
コード例 #3
0
 def test_construct_eventlet_get_api_providers_request(self):
     r = nare.NvpGetApiProvidersRequestEventlet(self.client)
     self.assertTrue(r is not None)