{
  "id": "python/pytest-mock-assert-called-with-any",
  "signature": "AssertionError: expected call not found.\nExpected: send_email('test@example.com')\nActual: send_email('test@example.com', subject='Hello')",
  "signature_zh": "AssertionError: 未找到预期调用。\n预期: send_email('test@example.com')\n实际: send_email('test@example.com', subject='Hello')",
  "regex": "AssertionError:\\ expected\\ call\\ not\\ found\\.\\\nExpected:\\ send_email\\('test@example\\.com'\\)\\\nActual:\\ send_email\\('test@example\\.com',\\ subject='Hello'\\)",
  "domain": "python",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "assert_called_with requires an exact match of arguments. If the actual call includes additional keyword arguments, the assertion fails.",
  "root_cause_type": "generic",
  "root_cause_zh": "assert_called_with 要求参数完全匹配。如果实际调用包含额外的关键字参数，断言会失败。",
  "versions": [
    {
      "version": "3.8",
      "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 only checks the call count, not the arguments.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The extra arguments may be required for the function.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "from unittest.mock import ANY\nmock.assert_called_with('test@example.com', subject=ANY)",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "mock.assert_called_with('test@example.com', subject='Hello')",
      "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.9,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-07-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}