Skip to content

Commit 0fc351c

Browse files
author
Claire Pajot
committed
Added taxonomy creation before testing annotations
1 parent 65dab9c commit 0fc351c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

tests/helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ def reference_id_from_url(url):
160160

161161
TEST_CATEGORY_ANNOTATIONS = [
162162
{
163-
"label": f"[Pytest] Category Annotation ${i}",
163+
"label": f"[Pytest] Category Label ${i}",
164164
"reference_id": reference_id_from_url(TEST_IMG_URLS[i]),
165-
"taxonomy_name": f"[Pytest] Category Taxonomy{i}",
165+
"taxonomy_name": "[Pytest] Category Taxonomy 1",
166166
}
167167
for i in range(len(TEST_IMG_URLS))
168168
]

tests/test_annotation.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ def dataset(CLIENT):
5858

5959
response = ds.append(ds_items)
6060
assert ERROR_PAYLOAD not in response.json()
61+
62+
response = ds.add_taxonomy(
63+
"[Pytest] Category Taxonomy 1",
64+
"category",
65+
[f"[Pytest] Category Label ${i}" for i in range((len(TEST_IMG_URLS)))],
66+
)
67+
assert ERROR_PAYLOAD not in response.json()
6168
yield ds
6269

6370
response = CLIENT.delete_dataset(ds.id)

0 commit comments

Comments
 (0)