# AssertionError: 未找到期望的调用。
期望: mock(1, 2, 3)
实际: mock(1, 2)

- **ID:** `python/unittest-mock-assert_called_with-failure`
- **领域:** python
- **类别:** runtime_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

模拟对象被调用时使用了与预期不同的参数，通常是由于被测试代码中的错误或测试期望不正确。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## 解决方案

1. **** (90% 成功率)
   ```
   Debug the actual arguments by printing mock.call_args_list or using `print(mock.mock_calls)`
   ```
2. **** (95% 成功率)
   ```
   Update the test to match the correct arguments, or fix the production code to pass the expected arguments.
   ```

## 无效尝试

- **** — This bypasses the argument validation, allowing incorrect calls to pass undetected. (90% 失败率)
- **** — The call already happened; timing is not the issue. The arguments are simply wrong. (30% 失败率)
