Exemplo n.º 1
0
    def test_simple(self, mock_run_event_listener):
        fire_signal(signal='test.signal', kwargs={'foo': 'bar'})

        mock_run_event_listener.delay.assert_called_once_with(
            listener='mock.Mock',
            signal='test.signal',
            kwargs={'foo': 'bar'},
        )
Exemplo n.º 2
0
    def test_simple(self, mock_run_event_listener):
        with patch.object(fire_signal, 'allow_absent_from_db', True):
            fire_signal(signal='test.signal', kwargs={'foo': 'bar'})

        mock_run_event_listener.delay.assert_called_once_with(
            listener='mock.Mock',
            signal='test.signal',
            kwargs={'foo': 'bar'},
        )