def test_state_callback_decorator(state_globals): callback = Mock() @states.state_callback def foo_bar(): pass states.add_state_callback(callback) foo_bar() assert callback.call_args == call('FOO', 'bar')
def test_state_callback_decorator(state_globals): callback = Mock() @states.state_callback def foo_bar(dummy): pass states.add_state_callback(callback) foo_bar(0) assert callback.call_args == call("FOO", "bar")