예제 #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()
예제 #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()
예제 #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)
예제 #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)