Skip to content

Commit 8a81c84

Browse files
committed
add unit test, wahoooooo
1 parent ab7747f commit 8a81c84

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_dataset.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,15 @@ def check_is_expected_response(response):
8383

8484
response = dataset.append(ds_items_with_metadata)
8585
check_is_expected_response(response)
86+
87+
def test_dataset_list_autotags(CLIENT):
88+
def check_is_expected_response(response):
89+
resp_json = response.json()
90+
assert AUTOTAGS_KEY in resp_json[AUTOTAGS_KEY]
91+
assert resp_json[AUTOTAGS_KEY] == []
92+
# Creation
93+
ds = CLIENT.create_dataset(TEST_DATASET_NAME)
94+
assert isinstance(ds, Dataset)
95+
# List of Autotags should be empty
96+
autotag_response = CLIENT.list_autotags(ds.id)
97+
check_is_expected_response(autotag_response)

0 commit comments

Comments
 (0)