Skip to content
Snippets Groups Projects
Commit 3b00a9f1 authored by NolanB's avatar NolanB
Browse files

Add a list_corpus_entities() method to entity.py

parent 0ee37752
No related branches found
No related tags found
No related merge requests found
...@@ -656,6 +656,7 @@ def test_list_transcription_entities(fake_dummy_worker): ...@@ -656,6 +656,7 @@ def test_list_transcription_entities(fake_dummy_worker):
assert len(fake_dummy_worker.api_client.responses) == 0 assert len(fake_dummy_worker.api_client.responses) == 0
<<<<<<< HEAD
<<<<<<< HEAD <<<<<<< HEAD
<<<<<<< HEAD <<<<<<< HEAD
======= =======
...@@ -719,5 +720,22 @@ def test_list_corpus_entities(fake_dummy_worker): ...@@ -719,5 +720,22 @@ def test_list_corpus_entities(fake_dummy_worker):
>>>>>>> fb7d0b7... Add a list_corpus_entities() method to entity.py >>>>>>> fb7d0b7... Add a list_corpus_entities() method to entity.py
======= =======
>>>>>>> a8b7730... Modif code with the review >>>>>>> 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.history) == 1
assert len(fake_dummy_worker.api_client.responses) == 0 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