Skip to content
Snippets Groups Projects
Verified Commit 78a7b5a0 authored by NolanB's avatar NolanB Committed by Yoann Schneider
Browse files

Add a list_corpus_entities() method to entity.py

parent fb92eaff
No related branches found
No related tags found
1 merge request!206Helper for ListCorpusEntities
This commit is part of merge request !206. Comments created here will be created in the context of that merge request.
......@@ -656,6 +656,7 @@ def test_list_transcription_entities(fake_dummy_worker):
assert len(fake_dummy_worker.api_client.responses) == 0
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
......@@ -719,5 +720,22 @@ def test_list_corpus_entities(fake_dummy_worker):
>>>>>>> fb7d0b7... Add a list_corpus_entities() method to entity.py
=======
>>>>>>> a8b7730... Modif code with the review
=======
def test_list_corpus_entities(fake_dummy_worker):
corpus = Corpus({"id": "fake_corpus_id"})
name = "fake_name"
parent = "fake_parent"
fake_dummy_worker.api_client.add_response(
"ListCorpusEntities",
id=corpus.id,
name=name,
parent=parent,
response={"id": "fake_entity_id"},
)
assert fake_dummy_worker.list_corpus_entities(corpus, name, parent) == {
"id": "fake_entity_id"
}
>>>>>>> fb7d0b7... Add a list_corpus_entities() method to entity.py
assert len(fake_dummy_worker.api_client.history) == 1
assert len(fake_dummy_worker.api_client.responses) == 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment