def test_shutdown_event_triggering(self):
        self.context.domain.state.side_effect = [[1], [5]]
        self.hook.context.subscribe('pre_shutdown', self.hook.pre_handler)
        self.hook.context.subscribe('post_shutdown', self.hook.post_handler)
        self.context.shutdown()
        self.assertEqual(self.hook.pre_event, 'pre_shutdown')
        self.assertEqual(self.hook.post_event, 'post_shutdown')
Pre and Post shutdown is triggered.
dataset/ETHPy150Open F-Secure/see/see/context/test/context_test.py/SeeContextTest.test_shutdown_event_triggering