Skip to content

Bulk delete API endpoint#620

Merged
rimu-stack merged 3 commits intomainfrom
entry_delete_many
Jul 11, 2025
Merged

Bulk delete API endpoint#620
rimu-stack merged 3 commits intomainfrom
entry_delete_many

Conversation

@Misha-Shvets
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a bulk-delete endpoint and corresponding tests for deleting multiple LDAP entries in one request.

  • Introduces delete_many route 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 requests to something like delete_requests to 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_user2 and adding_test_user3 are 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")

Comment thread app/api/main/router.py
Comment thread app/api/main/router.py Outdated
@Misha-Shvets Misha-Shvets requested a review from rimu-stack July 8, 2025 13:52
@rimu-stack rimu-stack changed the title add: implement bulk delete API endpoint and corresponding tests Bulk delete API endpoint Jul 11, 2025
@rimu-stack rimu-stack merged commit c5eff3c into main Jul 11, 2025
4 checks passed
@rimu-stack rimu-stack deleted the entry_delete_many branch July 11, 2025 09:10
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