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)
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)
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')
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)
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')
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)