Skip to content

Commit

Permalink
Fix __qualname__ assertion on alertmanager
Browse files Browse the repository at this point in the history
  • Loading branch information
Lord-Kamina committed Sep 8, 2024
1 parent 948a50a commit 9dc9e2d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion deluge/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ def mock_callback():
The returned Mock instance will have a `deferred` attribute which will complete when the callback has been called.
"""

def mock_handler(self):
pass

def reset(timeout=0.5, *args, **kwargs):
if mock.called:
original_reset_mock(*args, **kwargs)
Expand All @@ -52,7 +55,8 @@ def reset(timeout=0.5, *args, **kwargs):
mock.side_effect = lambda *args, **kw: deferred.callback((args, kw))
mock.deferred = deferred

mock = Mock()
mock = Mock(spec=mock_handler)
mock.deferred = None
original_reset_mock = mock.reset_mock
mock.reset_mock = reset
mock.reset_mock()
Expand Down

0 comments on commit 9dc9e2d

Please sign in to comment.