diff --git a/dandi/files/bids.py b/dandi/files/bids.py index 8ab7c06c7..a875ba1cc 100644 --- a/dandi/files/bids.py +++ b/dandi/files/bids.py @@ -235,7 +235,7 @@ def get_metadata( ) -class ZarrBIDSAsset(BIDSAsset, ZarrAsset): +class ZarrBIDSAsset(ZarrAsset, BIDSAsset): """ .. versionadded:: 0.46.0 diff --git a/dandi/tests/test_upload.py b/dandi/tests/test_upload.py index 81f76866c..2d08200cb 100644 --- a/dandi/tests/test_upload.py +++ b/dandi/tests/test_upload.py @@ -295,10 +295,12 @@ def test_upload_zarr(new_dandiset: SampleDandiset) -> None: # identical to above, but different scenaior/fixture and path. TODO: avoid duplication def test_upload_bids_zarr(bids_zarr_dandiset: SampleDandiset) -> None: bids_zarr_dandiset.upload() - (asset,) = bids_zarr_dandiset.dandiset.get_assets() + assets = list(bids_zarr_dandiset.dandiset.get_assets()) + assert len(assets) > 10 # it is a bigish dataset + (asset,) = [a for a in assets if a.path.endswith(".zarr")] assert isinstance(asset, RemoteZarrAsset) assert asset.asset_type is AssetType.ZARR - assert asset.path == "sample.zarr" + assert asset.path.endswith(".zarr") # Test that uploading again without any changes works: bids_zarr_dandiset.upload()