Skip to content

Commit d2b0e75

Browse files
committed
update test
1 parent 0e2a604 commit d2b0e75

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/test_pydantic_models.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from annofabapi.pydantic_models.simple_annotation import SimpleAnnotation
1010
from annofabapi.pydantic_models.single_annotation import SingleAnnotation
1111
from annofabapi.pydantic_models.task import Task
12+
from annofabapi.pydantic_models.task_history import TaskHistory
1213

1314
inifile = configparser.ConfigParser()
1415
inifile.read("./pytest.ini", "UTF-8")
@@ -35,6 +36,21 @@ def test__Task():
3536
Task.from_dict(task)
3637

3738

39+
def test__TaskHistory():
40+
content, _ = service.api.get_task_histories(project_id, task_id)
41+
TaskHistory.from_dict(content[0])
42+
43+
44+
# swagger.yamlの定義が間違っているためエラーが発生する
45+
# swagger.yamlの定義が修正されるまでコメントアウトする
46+
# def test__Comment():
47+
# with tempfile.NamedTemporaryFile() as temp_file:
48+
# service.wrapper.download_project_comments_url(project_id, temp_file.name)
49+
# with open(temp_file.name) as f:
50+
# comments = json.load(f)
51+
# Comment.from_dict(comments[0])
52+
53+
3854
def test__InputData():
3955
content, _ = service.api.get_input_data_list(project_id)
4056
input_data = content["list"][0]

0 commit comments

Comments
 (0)