@@ -91,7 +91,7 @@ def test_dataset_list_autotags(CLIENT, dataset):
91
91
assert autotag_response == []
92
92
93
93
94
- def test_slice_create_and_delete (dataset ):
94
+ def test_slice_create_and_delete_and_list (dataset ):
95
95
# Dataset upload
96
96
ds_items = []
97
97
for url in TEST_IMG_URLS :
@@ -114,12 +114,12 @@ def test_slice_create_and_delete(dataset):
114
114
assert len (dataset_slices ) == 1
115
115
assert slc .slice_id == dataset_slices [0 ]
116
116
117
- response = slc .info (id_type = "reference_id" )
117
+ response = slc .info ()
118
118
assert response ["name" ] == TEST_SLICE_NAME
119
119
assert response ["dataset_id" ] == dataset .id
120
- assert len (response ["reference_ids " ]) == 2
120
+ assert len (response ["dataset_items " ]) == 2
121
121
for item in ds_items [:2 ]:
122
- assert item .reference_id in response ["reference_ids " ]
122
+ assert item .reference_id == response ["dataset_items" ][ 0 ][ "reference_id" ] or item . reference_id == response [ "dataset_items" ][ 1 ][ "reference_id " ]
123
123
124
124
125
125
def test_slice_append (dataset ):
@@ -144,7 +144,7 @@ def test_slice_append(dataset):
144
144
# Insert duplicate first item
145
145
slc .append (reference_ids = [item .reference_id for item in ds_items [:3 ]])
146
146
147
- response = slc .info (id_type = "reference_ids" )
148
- assert len (response ["reference_ids " ]) == 3
147
+ response = slc .info ()
148
+ assert len (response ["dataset_items " ]) == 3
149
149
for item in ds_items [:3 ]:
150
- assert item .reference_id in response ["reference_ids " ]
150
+ assert item .reference_id == response ["dataset_items" ][ 0 ][ "reference_id" ] or item . reference_id == response [ "dataset_items" ][ 1 ][ "reference_id" ] or item . reference_id == response [ "dataset_items" ][ 2 ][ "reference_id " ]
0 commit comments