def test_member_cannot_add_document_to_non_existent_collection(
    normal_user_client: R2RClient, ):
    """A member tries to add a document to a collection that doesn't exist."""
    fake_coll_id = str(uuid.uuid4())
    doc_id = normal_user_client.documents.create(
        raw_text="Test Doc").results.document_id
    with pytest.raises(R2RException) as exc_info:
        normal_user_client.collections.add_document(fake_coll_id, doc_id)
    assert exc_info.value.status_code in [
        400,
        404,
    ], "Expected error when adding doc to non-existent collection."

    normal_user_client.documents.delete(doc_id)
A member tries to add a document to a collection that doesn't exist.
py/tests/integration/test_collections_users_interaction.py