Skip to content

Commit

Permalink
fix: [publish test] fixed
Browse files Browse the repository at this point in the history
- was incorrect as it triggered a background processed publishing, which can take time
  • Loading branch information
iglocska committed Jul 3, 2024
1 parent f967b54 commit 8029968
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/testlive_comprehensive.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,11 @@ def test_simple_event(self) -> None:
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)

Expand Down

0 comments on commit 8029968

Please sign in to comment.