def test_runner_crypto(self, mock_admin_msp, mock_channel_tx, mock_genesis_block, mock_setup_nodes): runner_crypto(self.OPTS) mock_admin_msp.assert_has_calls([ call(self.OPTS, "ord_MSP", verbose=False), call(self.OPTS, "peer_MSP", verbose=False), ]) mock_genesis_block.assert_called_once_with(self.OPTS, verbose=False) mock_channel_tx.assert_called_once_with(self.OPTS, verbose=False) # Setup node MSPs mock_setup_nodes.assert_has_calls([ call(self.OPTS, "orderer", verbose=False), call(self.OPTS, "peer", verbose=False), ])
def test_runner_crypto( self, mock_admin_msp, mock_channel_tx, mock_genesis_block, mock_setup_nodes, mock_get_msps, ): mock_get_msps.side_effect = [{"AlphaMSP", "BetaMSP"}] runner_crypto(self.OPTS) mock_get_msps.assert_called_once_with(opts=self.OPTS) mock_admin_msp.assert_has_calls( [call(self.OPTS, "AlphaMSP"), call(self.OPTS, "BetaMSP")], any_order=True) mock_genesis_block.assert_called_once_with(self.OPTS) mock_channel_tx.assert_called_once_with(self.OPTS) # Setup node MSPs mock_setup_nodes.assert_has_calls([call(self.OPTS)])
def crypto(settings): opts = load_config(settings.settings_file) runner_crypto(opts, verbose=settings.verbose)
def crypto(settings): opts = load_config(settings.settings_file) runner_crypto(opts)