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_sleep.py | |
parent | 4e203c8c410732597f2c43c445a21409b290ef0a (diff) | |
download | wee-slack-74c3a674d30d957f90480a8115224e13dfb7d41d.tar.gz |
Make methods work for callbacks
Diffstat (limited to 'tests/test_sleep.py')
-rw-r--r-- | tests/test_sleep.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_sleep.py b/tests/test_sleep.py index 4598778..893c108 100644 --- a/tests/test_sleep.py +++ b/tests/test_sleep.py @@ -4,6 +4,7 @@ import pytest import weechat from slack.task import FutureTimer, sleep, weechat_task_cb +from slack.util import get_callback_name @patch.object(weechat, "hook_timer") @@ -14,7 +15,7 @@ def test_sleep(mock_method: MagicMock): assert isinstance(future, FutureTimer) mock_method.assert_called_once_with( - milliseconds, 0, 1, weechat_task_cb.__name__, future.id + milliseconds, 0, 1, get_callback_name(weechat_task_cb), future.id ) with pytest.raises(StopIteration) as excinfo: |