def test_list_topologies(configs): mock_storm_cluster = mock.Mock() with mock.patch.object(pyleus.cli.topologies, 'StormCluster', return_value=mock_storm_cluster) as mock_ctr: list_topologies(configs) mock_ctr.assert_called_once_with( configs.storm_cmd_path, configs.nimbus_host, configs.nimbus_port, configs.verbose, configs.jvm_opts, ) mock_storm_cluster.list.assert_called_once_with()
def run(self, configs): list_topologies(configs)