From 78a7b5a0f0561f744ff424cbf5c6379a89999e62 Mon Sep 17 00:00:00 2001 From: NolanB <nboukachab@teklia.com> Date: Wed, 31 Aug 2022 15:41:09 +0200 Subject: [PATCH] Add a list_corpus_entities() method to entity.py --- tests/test_elements_worker/test_entities.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/test_elements_worker/test_entities.py b/tests/test_elements_worker/test_entities.py index 1ec7853f..2774e15e 100644 --- a/tests/test_elements_worker/test_entities.py +++ b/tests/test_elements_worker/test_entities.py @@ -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 -- GitLab