fix: [publish test] fixed

- was incorrect as it triggered a background processed publishing, which can take time
pull/1270/head
iglocska 2024-07-03 07:48:56 +02:00 committed by Raphaël Vinot
parent fe2da5f047
commit 56a5c4a34f
1 changed files with 4 additions and 0 deletions

View File

@ -864,7 +864,11 @@ class TestComprehensive(unittest.TestCase):
events = self.user_misp_connector.search(timestamp=timeframe, published=False)
self.assertEqual(len(events), 2)
# check publish & search
bg_processing_state = self.admin_misp_connector.get_server_setting('MISP.background_jobs')['value']
self.admin_misp_connector.set_server_setting('MISP.background_processing', False, force=True)
self.pub_misp_connector.publish(second)
self.admin_misp_connector.set_server_setting('MISP.background_processing', bg_processing_state, force=True)
events = self.user_misp_connector.search(timestamp=timeframe, published=False)
self.assertEqual(len(events), 1)