@patch('salt.utils.event')
    def test_fire(self, salt_utils_event):
        with patch.object(salt_utils_event, 'get_event'):
            self.assertFalse(event.fire('data', 'tag'))

        with patch.dict(event.__opts__, {'sock_dir': True, 'transport': True}):
            with patch.object(salt_utils_event, 'get_event') as mock:
                mock.fire_event = MagicMock(return_value=True)
                self.assertTrue(event.fire('data', 'tag'))
Test to fire an event on the local minion event bus.
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/event_test.py/EventTestCase.test_fire