예제 #1
0
def test_main(logging):
    with asynctest.patch(
            "paasta_tools.autoscale_cluster.autoscale_local_cluster",
            autospec=True) as mock_autoscale_local_cluster:
        main(("--dry-run", "--autoscaler-configs=/nail/blah"))
        mock_autoscale_local_cluster.assert_called_with(
            dry_run=True, config_folder="/nail/blah", log_level=None)
예제 #2
0
def test_main(logging):
    with asynctest.patch(
            'paasta_tools.autoscale_cluster.autoscale_local_cluster',
            autospec=True,
    ) as mock_autoscale_local_cluster:
        main(('--dry-run', '--autoscaler-configs=/nail/blah'))
        mock_autoscale_local_cluster.assert_called_with(
            dry_run=True, config_folder='/nail/blah', log_level=None)
예제 #3
0
def test_main(mock_parse_args, mock_autoscale_local_cluster, logging):
    mock_parse_args.return_value = mock.Mock(dry_run=True,
                                             autoscaler_configs='/nail/blah')
    main()
    mock_autoscale_local_cluster.assert_called_with(dry_run=True,
                                                    config_folder='/nail/blah')
예제 #4
0
def test_main(mock_parse_args, mock_autoscale_local_cluster, logging):
    mock_parse_args.return_value = mock.Mock(dry_run=True)
    main()
    mock_autoscale_local_cluster.assert_called_with(dry_run=True)
예제 #5
0
def test_main(mock_parse_args, mock_autoscale_local_cluster, logging):
    mock_parse_args.return_value = mock.Mock(dry_run=True, autoscaler_configs='/nail/blah')
    main()
    mock_autoscale_local_cluster.assert_called_with(dry_run=True, config_folder='/nail/blah')
예제 #6
0
def test_main(mock_autoscale_local_cluster, logging):
    main(('--dry-run', '--autoscaler-configs=/nail/blah'))
    mock_autoscale_local_cluster.assert_called_with(dry_run=True,
                                                    config_folder='/nail/blah',
                                                    log_level=None)