Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulk search ID checker #13

Closed
denver-code opened this issue Jun 21, 2023 · 0 comments · Fixed by #14
Closed

Bulk search ID checker #13

denver-code opened this issue Jun 21, 2023 · 0 comments · Fixed by #14
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@denver-code
Copy link
Owner

Make a quick check if list of IDs could be represented as a list of ObjectID's
image

Test:

def test_bulk_search_one_valid(client):
    test_signup(client)
    token1 = client.post(
    "/api/public/authorisation/signin", 
    json={
        "email": "testuser@test.com",
        "password": "testpassword",
    }).json().get("token", "")
    user1 = client.get("/api/private/profile", headers={"Authorisation":token1}).json()

    del user1["email"]

    response = client.post("/api/public/profile/bulk",
        json={
            "users": [
                user1["id"],
                "11111891a5d13e63599968cc1"
            ]
        }
    )
    assert response.status_code == 200
    assert response.json() == [
        user1
    ]
@denver-code denver-code added bug Something isn't working enhancement New feature or request labels Jun 21, 2023
@denver-code denver-code self-assigned this Jun 21, 2023
@denver-code denver-code linked a pull request Jun 22, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant