Bulk delete API endpoint#620
Merged
rimu-stack merged 3 commits intomainfrom Jul 11, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a bulk-delete endpoint and corresponding tests for deleting multiple LDAP entries in one request.
- Introduces
delete_manyroute to process a list of delete operations. - Adds an end-to-end test (
test_api_delete_many) covering the bulk delete. - Defines new fixtures (
adding_test_user2,adding_test_user3) for seeding test users.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| app/api/main/router.py | Added delete_many endpoint for bulk delete. |
| tests/test_api/test_main/test_router/test_delete.py | Created test test_api_delete_many for bulk delete. |
| tests/test_api/test_main/conftest.py | Added fixtures adding_test_user2 and adding_test_user3. |
Comments suppressed due to low confidence (3)
app/api/main/router.py:99
- Rename the parameter
requeststo something likedelete_requeststo avoid confusion with HTTP requests and improve readability.
requests: list[DeleteRequest],
tests/test_api/test_main/test_router/test_delete.py:129
- Add an assertion to verify the returned list length matches the number of delete requests (e.g.,
assert len(data) == 3) to ensure the endpoint returns a result for each input.
data = response.json()
tests/test_api/test_main/conftest.py:164
- The fixtures
adding_test_user2andadding_test_user3are not referenced by any tests and duplicate setup logic. Either unify or remove them to avoid unused code and duplication.
@pytest_asyncio.fixture(scope="function")
rimu-stack
reviewed
Jul 8, 2025
…e corresponding test
rimu-stack
approved these changes
Jul 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.