From 57677bd7e680d39cf2b99d83ff2b7f5e9e65a58e Mon Sep 17 00:00:00 2001 From: Dr-Blank <64108942+Dr-Blank@users.noreply.github.com> Date: Fri, 12 Apr 2024 07:36:26 -0400 Subject: [PATCH] try return path itself to avoid side effects --- test/plugins/test_art.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/plugins/test_art.py b/test/plugins/test_art.py index 3278682a4..deb6f354e 100644 --- a/test/plugins/test_art.py +++ b/test/plugins/test_art.py @@ -896,11 +896,11 @@ class ArtForAlbumTest(UseThePlugin): else: self.assertIsNone(candidate) - def _assert_image_operated( - self, image_file, operation, should_operate - ): # noqa + def _assert_image_operated(self, image_file, operation, should_operate): self.image_file = image_file - with patch.object(ArtResizer.shared, operation) as mock_operation: + with patch.object( + ArtResizer.shared, operation, return_value=self.image_file + ) as mock_operation: self.plugin.art_for_album(self.album, [""], True) self.assertEqual(mock_operation.called, should_operate)