Skip to content

fix: unbreak Python Tests after PR #38 json= client.request - #41

Merged
shubham5080 merged 1 commit into
mainfrom
fix/ci-pr38-mock-json
Aug 4, 2026
Merged

fix: unbreak Python Tests after PR #38 json= client.request#41
shubham5080 merged 1 commit into
mainfrom
fix/ci-pr38-mock-json

Conversation

@shubham5080

@shubham5080 shubham5080 commented Aug 4, 2026

Copy link
Copy Markdown
Member

Summary

  • After merging feat: Week 10 /pr command, GitHub App auth, and PR link comments #38, GitHubRestAdapter calls _client.request(..., json=json_body).
  • Several unit-test mock clients only accepted method/path/params, so CI on main failed with 23 TypeError: unexpected keyword argument 'json'.
  • Updated mocks in retry / rate-limit / ingestion tests to accept **kwargs (same pattern as test_open_prs_search.py).

Test plan

  • pytest tests/test_github_retry.py tests/test_github_rate_limit.py tests/test_github_ingestion_comments.py tests/test_github_ingestion_lifecycle_events.py
  • Confirm GitHub Actions Python Tests is green on this PR
  • After merge, confirm Python Tests is green on main

Made with Cursor

Summary by CodeRabbit

  • Tests
    • Improved test coverage compatibility for requests that include additional optional parameters.
    • Preserved existing mocked response, sequencing, and exception behavior across ingestion, rate-limit, and retry scenarios.

PR #38 started passing json= to client.request(); outdated mocks
rejected it and broke Python Tests on main (23 failures).

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 99373e5f-5586-4f4a-bacb-4a395e0b56f5

📥 Commits

Reviewing files that changed from the base of the PR and between 16e5f4a and b569740.

📒 Files selected for processing (4)
  • tests/test_github_ingestion_comments.py
  • tests/test_github_ingestion_lifecycle_events.py
  • tests/test_github_rate_limit.py
  • tests/test_github_retry.py

Walkthrough

The test mock clients now accept arbitrary keyword arguments. Existing route lookup, response construction, response sequences, and exception behavior remain unchanged.

Changes

Mock Request Compatibility

Layer / File(s) Summary
Update test mock signatures
tests/test_github_ingestion_comments.py, tests/test_github_ingestion_lifecycle_events.py, tests/test_github_rate_limit.py, tests/test_github_retry.py
The mock request methods accept **kwargs while preserving existing behavior.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Poem

I’m a rabbit with tests in my den,
Now extra request words fit in again.
Routes still point true,
Sequences run through,
And responses hop safely till then.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: fixing Python tests after client.request began receiving json=.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-pr38-mock-json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@shubham5080
shubham5080 merged commit 6cc3df3 into main Aug 4, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant