fix(tests): give the dict-based test fakes an __eq__

_HttpResponse in the funkwhale same-origin test and _RawGetHostvars in the email lookup test subclass dict and add their own attribute, so dict equality ignored that attribute (CodeQL py/missing-equals). Each now compares as the same type, the same dict content and the same extra attribute.

🎯 Fix: 92 %
💥 Break: 1 %
💸 Cost: –
⏱️ Time: –
🛡️ Security: 100 %
🏆 Score: 91
🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 %

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
kevinveenbirkenbachandClaude Opus 5.5 committed 2026-11-12 08:02:56 +00:00
1 parent dcb7eff9d6
commit 194e01d0e9
2 files changed
+14

No files matched your search

@@ -807,6 +807,13 @@ class _RawGetHostvars(dict):
super().__init__(templated)
self._raw = raw
def __eq__(self, other: object) -> bool:
return (
isinstance(other, _RawGetHostvars)
and dict.__eq__(self, other)
and self._raw == other._raw
)
def raw_get(self, host: str) -> dict:
return self._raw[host]