Skip to content

Commit 91f69da

Browse files
committed
tests(worker): Use key instead of id to match tree objects in tests
1 parent 0ce5449 commit 91f69da

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

services/datalad/tests/test_files.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,8 @@ def test_file_indexing(client, new_dataset):
210210
'directory': False,
211211
},
212212
{
213-
'id': '2f8451ae1016f936999aaacc0b3d79fb284ac3ea',
213+
'id': 'c645e39adc3bd84b8d9a30635efb2c0df3b3e0cc',
214+
'key': '2f8451ae1016f936999aaacc0b3d79fb284ac3ea',
214215
'filename': 'sub-01',
215216
'directory': True,
216217
'annexed': False,
@@ -224,7 +225,7 @@ def test_file_indexing(client, new_dataset):
224225
'/datasets/{}/tree/{}'.format(
225226
ds_id,
226227
next(
227-
(f['id'] for f in root_content['files'] if f['filename'] == 'sub-01'),
228+
(f['key'] for f in root_content['files'] if f['filename'] == 'sub-01'),
228229
None,
229230
),
230231
)
@@ -236,7 +237,8 @@ def test_file_indexing(client, new_dataset):
236237
'/datasets/{}/tree/{}'.format(
237238
ds_id,
238239
next(
239-
(f['id'] for f in sub_content['files'] if f['filename'] == 'anat'), None
240+
(f['key'] for f in sub_content['files'] if f['filename'] == 'anat'),
241+
None,
240242
),
241243
)
242244
)

0 commit comments

Comments
 (0)