fix: [publish test] fixed

- was incorrect as it triggered a background processed publishing, which can take time
pull/1251/head
iglocska 2024-07-03 07:48:56 +02:00
parent f967b54878
commit 802996836c
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
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)