Skip to content

Commit 22bde3b

Browse files
committed
add back in saif's magic code
1 parent befc54a commit 22bde3b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

sde_collections/tests/test_workflow_status_triggers.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,19 @@ def test_quality_check_perfect_triggers_public_query(self, mock_add):
6363

6464
class TestReindexingStatusTransitions(TestCase):
6565
def setUp(self):
66+
# Mock the GitHubHandler to return valid XML content
67+
self.mock_github_handler = patch("sde_collections.models.collection.GitHubHandler").start()
68+
69+
self.mock_github_handler.return_value._get_file_contents.return_value.decoded_content = (
70+
b'<?xml version="1.0" encoding="UTF-8"?>\n'
71+
b"<Sinequa>\n"
72+
b" <KeepHashFragmentInUrl>false</KeepHashFragmentInUrl>\n"
73+
b" <CollectionSelection>Sample Collection</CollectionSelection>\n"
74+
b"</Sinequa>"
75+
)
76+
77+
self.addCleanup(patch.stopall)
78+
6679
# Create the collection with the mock applied
6780
self.collection = CollectionFactory(
6881
workflow_status=WorkflowStatusChoices.QUALITY_CHECK_PERFECT,

0 commit comments

Comments
 (0)