Пример #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)