How to use the pyqs.main.main function in pyqs

To help you get started, we’ve selected a few pyqs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github spulec / PyQS / tests / test_manager_worker.py View on Github external
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,
    )