

def test_calling_command_instance_should_fire_process_command_method(self):

    class C(Command):

        def __init__(self, lizy):
            super(C, self).__init__(lizy, 'C', 'C description')

        def _process_command(self, lizy, args):
            return (None, None)
    with patch.object(C, '_process_command') as process_command:
        process_command.return_value = (None, None)
        subparser_mock = (lambda : 0)
        subparser_mock.add_parser = MagicMock()
        args_mock = (lambda : 0)
        args_mock.verbose = False
        info_container = InfoContainer()
        info_container.is_empty = False
        lizy = Pylease(None, subparser_mock, info_container)
        c = C(lizy)
        c(args_mock)
        process_command.assert_called_once_with(lizy, args_mock)

dataset/ETHPy150Open n9code/pylease/tests/test_command.py CommandTest.test_calling_command_instance_should_fire_process_command_method/original