git-patchwork-bot: add mocked API and hash tests
Add tests for the patchwork API interaction functions using
unittest.mock to avoid needing a live patchwork instance:
- get_patchwork_pull_requests_by_project: pull URL parsing, missing
refnames, null pull_url entries, query parameter validation
- get_patchwork_patches_by_project_hash: hash lookups
- get_patchwork_patches_by_project_msgid: message-id lookups
- get_patchwork_hash: diff hashing including line number
normalization, -p1 prefix handling, preamble stripping, and
CRLF normalization
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Assisted-by: claude-opus-4-6
1 file changed