Here are the examples of the python api scrapi.events.dispatch taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
4 Examples
0
Example 1
def test_dispatch(mock_event):
events.dispatch('event', 'passed')
mock_event.assert_called_once_with(
'event', {'event': 'event', 'status': 'passed'})
0
Example 2
def test_dispatch_index(mock_event):
events.dispatch('event', 'passed', _index='foo')
mock_event.assert_called_once_with(
'event.foo', {'event': 'event', 'status': 'passed'})
0
Example 3
Project: scrapi Source File: test_logging.py
def test_dispatch_kwargs(mock_event):
events.dispatch('event', 'passed', ash='ketchem')
mock_event.assert_called_once_with(
'event', {'event': 'event', 'status': 'passed', 'ash': 'ketchem'})
0
Example 4
Project: scrapi Source File: test_logging.py
def test_dispatch_index_kwargs(mock_event):
events.dispatch('event', 'passed', _index='pallet', ash='ketchem')
mock_event.assert_called_once_with(
'event.pallet', {'event': 'event', 'status': 'passed', 'ash': 'ketchem'})