Esempio 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'},
        )
Esempio 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'},
        )