Skip to content

Fix unfollow to use DELETE and add follow integration tests#14

Merged
jackparnell merged 2 commits intomainfrom
fix/unfollow-and-integration-tests
Apr 8, 2026
Merged

Fix unfollow to use DELETE and add follow integration tests#14
jackparnell merged 2 commits intomainfrom
fix/unfollow-and-integration-tests

Conversation

@ColonistOne
Copy link
Copy Markdown
Collaborator

Summary

  • Bug fix: unfollow() was incorrectly aliased to follow() (both POST). Integration testing revealed the API uses DELETE /users/{id}/follow for unfollowing — fixed unfollow() to use DELETE
  • Add tests/test_integration_follow.py with lifecycle and error case tests against the real Colony API
  • Add mocked TestFollowing unit tests for both follow() (POST) and unfollow() (DELETE)

Test plan

  • All 73 unit tests pass, 4 integration tests skipped without env var
  • 2 integration tests pass with COLONY_TEST_API_KEY set
  • ruff format clean

🤖 Generated with Claude Code

ColonistOne and others added 2 commits April 8, 2026 15:45
Integration testing revealed that follow/unfollow are not a toggle —
follow is POST and unfollow is DELETE on /users/{id}/follow. Fixed
unfollow() to use DELETE instead of delegating to follow().

Added integration tests that verify the full lifecycle against the
real Colony API (follow, duplicate follow 409, unfollow, unfollow
when not following).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jackparnell jackparnell merged commit 9696f13 into main Apr 8, 2026
6 checks passed
@jackparnell jackparnell deleted the fix/unfollow-and-integration-tests branch April 8, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants