Exemplo n.º 1
0
 def test_get_composer_data_exception(self, mock_get_app_info):
     mock_get_app_info.side_effect = [ValueError]
     with pytest.raises(ValueError):
         get_composer_data(self.OPTS, verbose=True)
     mock_get_app_info.assert_called_once_with("peer-namespace",
                                               "hlc-hl-composer-rest",
                                               "hlc-hl-composer-rest",
                                               secret_key="COMPOSER_APIKEY")
Exemplo n.º 2
0
 def test_get_composer_data(self, mock_get_app_info):
     mock_get_app_info.side_effect = [{"api-key": "hlc-key", "url": "an-ingress"}]
     get_composer_data(self.OPTS)
     mock_get_app_info.assert_called_once_with(
         "peer-namespace",
         "hlc-hl-composer-rest",
         "hlc-hl-composer-rest",
         secret_key="COMPOSER_APIKEY",
         verbose=False,
     )
Exemplo n.º 3
0
 def test_get_composer_data(self, mock_get_app_info):
     mock_get_app_info.side_effect = [{
         'api-key': 'hlc-key',
         'url': 'an-ingress'
     }]
     get_composer_data(self.OPTS)
     mock_get_app_info.assert_called_once_with('peer-namespace',
                                               'hlc-hl-composer-rest',
                                               'hlc-hl-composer-rest',
                                               secret_key='COMPOSER_APIKEY',
                                               verbose=False)