def test_delete_document(collection, doc_id, doc):
    f.write_document(collection, doc_id, doc)
    assert f.get_document(collection, doc_id)
    f.delete_document(collection, doc_id)
    assert not f.get_document(collection, doc_id)
Пример #2
0
def delete_observation(observation_id: str) -> None:
    delete_document("observations", observation_id)
Пример #3
0
def process_update_nickname(user_id: str, nickname_old: str,
                            nickname_new: str):
    write_document("nicknames", nickname_new, {"user": user_id})
    update_document("public_users", user_id, {"nickname": nickname_new})
    delete_document("nicknames", nickname_old)
Пример #4
0
def delete_individual(individual_id: str) -> None:
    delete_document("individuals", individual_id)
Пример #5
0
def process_delete_user(user_id: str, nickname: str):
    delete_document("nicknames", nickname)
    delete_document("public_users", user_id)