Skip to content

Conversation

@Wanbogang
Copy link
Collaborator

Summary

This PR adds comprehensive unit tests for the src/hooks/person_follow_hook.py module to improve code coverage and ensure the stability of the start_person_follow_hook and stop_person_follow_hook functions.

Changes

  • Added tests/test_hooks_person_follow_hook.py with tests for:
    • start_person_follow_hook function (success on first attempt, success after retry, max retries exceeded, connection error)
    • stop_person_follow_hook function (success, failure, connection error)
  • Properly mocks the aiohttp.ClientSession and related components for testing
  • Includes helper functions to reduce code duplication in tests
  • Uses pytest and unittest.mock for asynchronous mocking
  • Implements efficient mocking strategy with helper functions

@Wanbogang Wanbogang requested a review from a team as a code owner January 29, 2026 12:03
@github-actions github-actions bot added python Python code tests Test files labels Jan 29, 2026
@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Python code tests Test files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant