Better mocking for getfullargspec

Seems much more straightforward this way?
This commit is contained in:
Adrian Sampson 2023-10-20 17:36:21 -04:00
parent a9e1b607c5
commit cc0979692b
No known key found for this signature in database

View file

@ -321,9 +321,9 @@ class ListenersTest(unittest.TestCase, TestHelper):
[d.dummy, d2.dummy])
@patch('beets.plugins.find_plugins')
@patch('beets.plugins.inspect')
def test_events_called(self, mock_inspect, mock_find_plugins):
mock_inspect.getfullargspec.return_value = Mock(
@patch('inspect.getfullargspec')
def test_events_called(self, mock_gfa, mock_find_plugins):
mock_gfa.return_value = Mock(
args=(),
varargs='args',
varkw='kwargs',