Skip to content

feat: add move method to pages endpoint#307

Merged
ramnes merged 2 commits intoramnes:mainfrom
JJocelynH:feat/add-move-page-endpoint
Dec 18, 2025
Merged

feat: add move method to pages endpoint#307
ramnes merged 2 commits intoramnes:mainfrom
JJocelynH:feat/add-move-page-endpoint

Conversation

@JJocelynH
Copy link
Copy Markdown
Contributor

Description

Add pages.move() method to move Notion pages to new parent locations.

Changes

  • Add move() method to PagesEndpoint class
  • Use PATCH /pages/{page_id} endpoint
  • Support moving pages to new page or database parents
  • Add unit test test_move_pages with mocked API calls

Testing

python3 -m pytest tests/test_endpoints.py::test_move_pages -v

✅ All tests pass (125 passed)
✅ Coverage remains at 100%
✅ Pre-commit hooks pass

References

- Add pages.move() method to move pages to new parents
- Add test_move_pages with mocked API calls
- Follows existing code patterns in the project

Implements move page functionality from JS SDK
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (c1b8d9c) to head (7e70e03).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #307   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          424       426    +2     
=========================================
+ Hits           424       426    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Owner

@ramnes ramnes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for this! Can you not mock but use a cassette instead, just like the other tests around? We have a few mocks for very specific use cases but I don't need we need them here.

@JJocelynH
Copy link
Copy Markdown
Contributor Author

Hi I updated to use VCR tests with real API calls instead of mocks. Ready for review!

Copy link
Copy Markdown
Owner

@ramnes ramnes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@ramnes ramnes merged commit daacf70 into ramnes:main Dec 18, 2025
9 checks passed
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.

3 participants