diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-01-15 15:07:30 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:53 +0100 |
commit | 74c3a674d30d957f90480a8115224e13dfb7d41d (patch) | |
tree | ebb479d7a1f677b5d61f7a6515bdafab979e8489 /tests/test_hook_process_hashtable.py | |
parent | 4e203c8c410732597f2c43c445a21409b290ef0a (diff) | |
download | wee-slack-74c3a674d30d957f90480a8115224e13dfb7d41d.tar.gz |
Make methods work for callbacks
Diffstat (limited to 'tests/test_hook_process_hashtable.py')
-rw-r--r-- | tests/test_hook_process_hashtable.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_hook_process_hashtable.py b/tests/test_hook_process_hashtable.py index e8a1f64..9d0db36 100644 --- a/tests/test_hook_process_hashtable.py +++ b/tests/test_hook_process_hashtable.py @@ -6,6 +6,7 @@ import weechat import slack.http from slack.http import hook_process_hashtable from slack.task import FutureProcess, FutureTimer, weechat_task_cb +from slack.util import get_callback_name @patch.object(weechat, "hook_process_hashtable") @@ -18,7 +19,7 @@ def test_hook_process_hashtable(mock_method: MagicMock): assert isinstance(future, FutureProcess) mock_method.assert_called_once_with( - command, options, timeout, weechat_task_cb.__name__, future.id + command, options, timeout, get_callback_name(weechat_task_cb), future.id ) with pytest.raises(StopIteration) as excinfo: @@ -36,7 +37,7 @@ def test_hook_process_hashtable_chunked(mock_method: MagicMock): assert isinstance(future, FutureProcess) mock_method.assert_called_once_with( - command, options, timeout, weechat_task_cb.__name__, future.id + command, options, timeout, get_callback_name(weechat_task_cb), future.id ) assert isinstance(coroutine.send((command, -1, "o1", "e1")), FutureProcess) |