Exemplo n.º 1
0
    def test_only_call_actions(self):
        self.options['-invoke'] = True

        invoke = Mock()
        self.dispatcher._invoke = invoke

        dispatch(self.options, self.dispatcher)

        invoke.assert_not_called()
Exemplo n.º 2
0
    def test_only_call_actions(self):
        self.options['-invoke'] = True

        invoke = Mock()
        self.dispatcher._invoke = invoke

        dispatch(self.options, self.dispatcher)

        invoke.assert_not_called()
Exemplo n.º 3
0
    def test_actions_call(self):
        self.options['invoke'] = True

        invoke = Mock()
        self.dispatcher.invoke = invoke

        dispatch(self.options, self.dispatcher)

        invoke.assert_called_once_with(self.options)
Exemplo n.º 4
0
    def test_actions_call(self):
        self.options['invoke'] = True

        invoke = Mock()
        self.dispatcher.invoke = invoke

        dispatch(self.options, self.dispatcher)

        invoke.assert_called_once_with(self.options)