{
  "id": "python/unittest-mock-assert_called_with-failure",
  "signature": "AssertionError: expected call not found.\nExpected: mock(1, 2, 3)\nActual: mock(1, 2)",
  "signature_zh": "AssertionError: 未找到期望的调用。\n期望: mock(1, 2, 3)\n实际: mock(1, 2)",
  "regex": "AssertionError:\\ expected\\ call\\ not\\ found\\.\\\nExpected:\\ mock\\(1,\\ 2,\\ 3\\)\\\nActual:\\ mock\\(1,\\ 2\\)",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The mock object was called with different arguments than expected, often due to a bug in the code under test or incorrect test expectations.",
  "root_cause_type": "generic",
  "root_cause_zh": "模拟对象被调用时使用了与预期不同的参数，通常是由于被测试代码中的错误或测试期望不正确。",
  "versions": [
    {
      "version": "3.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.9",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This bypasses the argument validation, allowing incorrect calls to pass undetected.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The call already happened; timing is not the issue. The arguments are simply wrong.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Debug the actual arguments by printing mock.call_args_list or using `print(mock.mock_calls)`",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Update the test to match the correct arguments, or fix the production code to pass the expected arguments.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-08-18",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}