diff --git a/tests/test_pydantic_models.py b/tests/test_pydantic_models.py index 3aaeed4c..e6f96729 100644 --- a/tests/test_pydantic_models.py +++ b/tests/test_pydantic_models.py @@ -9,6 +9,7 @@ from annofabapi.pydantic_models.simple_annotation import SimpleAnnotation from annofabapi.pydantic_models.single_annotation import SingleAnnotation from annofabapi.pydantic_models.task import Task +from annofabapi.pydantic_models.task_history import TaskHistory inifile = configparser.ConfigParser() inifile.read("./pytest.ini", "UTF-8") @@ -35,6 +36,21 @@ def test__Task(): Task.from_dict(task) +def test__TaskHistory(): + content, _ = service.api.get_task_histories(project_id, task_id) + TaskHistory.from_dict(content[0]) + + +# swagger.yamlの定義が間違っているためエラーが発生する +# swagger.yamlの定義が修正されるまでコメントアウトする +# def test__Comment(): +# with tempfile.NamedTemporaryFile() as temp_file: +# service.wrapper.download_project_comments_url(project_id, temp_file.name) +# with open(temp_file.name) as f: +# comments = json.load(f) +# Comment.from_dict(comments[0]) + + def test__InputData(): content, _ = service.api.get_input_data_list(project_id) input_data = content["list"][0]