[GH-ISSUE #23613] test: add integration tests for notes API #35558

Closed
opened 2026-04-25 09:45:15 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @mohi-devhub on GitHub (Apr 12, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23613

Check Existing Issues

  • I have searched for all existing open AND closed issues and discussions for similar requests. I have found none that is comparable to my request.

Verify Feature Scope

  • I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions.

Problem Description

The notes API (routers/notes.py) has no test coverage. The test directory has tests for auths, models, and users, but notes is missing. This is particularly important given the recent multi-word search normalisation fix, which had no regression test to prevent future breakage.
Related to #21783 (backend test coverage gap).

Desired Solution you'd like

Add test_notes.py following the same pattern as test_users.py, covering:

  • Create: happy path, 401 when notes feature is disabled
  • Get by ID: owner access, 404 for unknown ID, 403 for non-owner
  • List: empty result, scoped to requesting user only
  • Search: single-word, multi-word normalisation (regression for the "to do" / "to-do" fix), content match, no results, cross-user isolation
  • Update: happy path, 403 for non-owner, 404 for unknown ID
  • Delete: happy path, 403 for non-owner, 404 for unknown ID
  • Admin: can get and delete any user's note

Alternatives Considered

No response

Additional Context

No response

Originally created by @mohi-devhub on GitHub (Apr 12, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/23613 ### Check Existing Issues - [x] I have searched for all existing **open AND closed** issues and discussions for similar requests. I have found none that is comparable to my request. ### Verify Feature Scope - [x] I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions. ### Problem Description The notes API (routers/notes.py) has no test coverage. The test directory has tests for auths, models, and users, but notes is missing. This is particularly important given the recent multi-word search normalisation fix, which had no regression test to prevent future breakage. Related to #21783 (backend test coverage gap). ### Desired Solution you'd like Add test_notes.py following the same pattern as test_users.py, covering: - Create: happy path, 401 when notes feature is disabled - Get by ID: owner access, 404 for unknown ID, 403 for non-owner - List: empty result, scoped to requesting user only - Search: single-word, multi-word normalisation (regression for the "to do" / "to-do" fix), content match, no results, cross-user isolation - Update: happy path, 403 for non-owner, 404 for unknown ID - Delete: happy path, 403 for non-owner, 404 for unknown ID - Admin: can get and delete any user's note ### Alternatives Considered _No response_ ### Additional Context _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#35558