def test_raw_input_list_cmd1(self, ignored): mocked_cmd = Mock() with patch.dict(self.pymp.commands, {'\l': mocked_cmd}): self.pymp.raw_input('>>> ') mocked_cmd.assert_called_once_with('global')