diff --git a/tests/test_filecrawl.py b/tests/test_filecrawl.py index 51c81d2..3991a4a 100644 --- a/tests/test_filecrawl.py +++ b/tests/test_filecrawl.py @@ -1,6 +1,6 @@ import unittest from collections import defaultdict -from unittest.mock import MagicMock, patch +from unittest.mock import patch from cellxgene_gateway.filecrawl import ( render_item, @@ -47,6 +47,7 @@ class TestRenderEntry(unittest.TestCase): class TestRenderAnnotation(unittest.TestCase): + @patch('cellxgene_gateway.filecrawl.enable_annotations', new=True) def test_GIVEN_no_annotation_THEN_new_alone(self): entry = make_entry(annotations=None) rendered = render_item(entry, source) @@ -55,6 +56,7 @@ class TestRenderAnnotation(unittest.TestCase): rendered, ) + @patch('cellxgene_gateway.filecrawl.enable_annotations', new=True) def test_GIVEN_annotation_THEN_new_before(self): annotation = FileItem( subpath="somepath/entry_annotations", @@ -69,7 +71,8 @@ class TestRenderAnnotation(unittest.TestCase): " annot", rendered, ) - + + @patch('cellxgene_gateway.filecrawl.enable_annotations', new=True) def test_GIVEN_annotation_THEN_escaped(self): annotation = FileItem( subpath="somepath/entry_annotations", @@ -119,8 +122,7 @@ class TestRenderItemTree(unittest.TestCase): rendered, "
  • baz
  • ", + " ", ) @patch(