From c1111e2cb47c9b76ff043fe6541c0f9edb5375ea Mon Sep 17 00:00:00 2001 From: Alok Saldanha Date: Sat, 2 Mar 2024 12:23:11 -0500 Subject: [PATCH] #87 patch enable annotations --- tests/test_filecrawl.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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(