"""Test Worker.""" import argparse from unittest.mock import patch class FakeArgs: """Return a namespace like argparse.ArgumentParse.""" def __init__(self, **kwargs): """Create the namespace and populate the properties.""" self.__dict__.update(kwargs) @patch('argparse.ArgumentParser', spec=argparse.ArgumentParser) def test_get_args(mock_parser): """Test getting cli args.""" mock_parser.return_value.parse_args.return_value = FakeArgs( statement_file='hi')