Esempio n. 1
0
def test_real_main_method(ArgumentParser, _main):
    """
    Test parsing of arguments from main method
    """
    ArgumentParser.return_value.parse_args.return_value = Mock(
        concurrency=3,
        queues=["email1"],
        interval=1,
        batchsize=10,
        logging_level="WARN",
        region='us-east-1',
        prefetch_multiplier=2,
        access_key_id=None,
        secret_access_key=None)
    main()

    _main.assert_called_once_with(queue_prefixes=['email1'],
                                  concurrency=3,
                                  interval=1,
                                  batchsize=10,
                                  logging_level="WARN",
                                  region='us-east-1',
                                  prefetch_multiplier=2,
                                  access_key_id=None,
                                  secret_access_key=None)
Esempio n. 2
0
def test_real_main_method(ArgumentParser, _main):
    """
    Test parsing of arguments from main method
    """
    ArgumentParser.return_value.parse_args.return_value = Mock(
        concurrency=3, queues=["email1"], interval=1, batchsize=10,
        logging_level="WARN", region='us-east-1', prefetch_multiplier=2,
        access_key_id=None, secret_access_key=None,
    )
    main()

    _main.assert_called_once_with(
        queue_prefixes=['email1'], concurrency=3, interval=1, batchsize=10,
        logging_level="WARN", region='us-east-1', prefetch_multiplier=2,
        access_key_id=None, secret_access_key=None,
    )