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)
def delete_observation(observation_id: str) -> None: delete_document("observations", observation_id)
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)
def delete_individual(individual_id: str) -> None: delete_document("individuals", individual_id)
def process_delete_user(user_id: str, nickname: str): delete_document("nicknames", nickname) delete_document("public_users", user_id)