예제 #1
0
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()
예제 #2
0
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()
예제 #3
0
 def run(self, configs):
     list_topologies(configs)