From 88b9b815c00b7b80920633b239ee86c855d3107d Mon Sep 17 00:00:00 2001 From: Andreas Eisenbarth Date: Wed, 12 Oct 2022 16:37:33 +0200 Subject: [PATCH] Adjust test case for dirs with h5ad --- tests/test_filecrawl.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/test_filecrawl.py b/tests/test_filecrawl.py index c5932e0..f5c88b7 100644 --- a/tests/test_filecrawl.py +++ b/tests/test_filecrawl.py @@ -57,9 +57,16 @@ class TestRenderItemTree(unittest.TestCase): @patch("cellxgene_gateway.items.file.fileitem_source.FileItemSource") def test_GIVEN_deep_nested_dirs_THEN_includes_dirs_in_output(self, item_source): item_source.name = "FakeSource" - item_tree = ItemTree("foo/bar/baz", [], []) + item_source.get_annotations_subpath = lambda _: "FakeAnnotations" + file_item = FileItem( + subpath="foo/bar/baz", name="file.h5ad", type=ItemType.h5ad + ) + item_tree = ItemTree("foo/bar/baz", [file_item], []) rendered = render_item_tree(item_tree, item_source) self.assertEqual( rendered, - "
  • baz
  • ", + "
  • baz
  • ", )