apprise/packaging/redhat/apprise-pytest-session_mocker-removal.patch

30 lines
1.0 KiB
Diff
Raw Normal View History

diff -Naur apprise-1.8.0/test/conftest.py apprise-1.8.0-patched/test/conftest.py
--- apprise-1.8.0/test/conftest.py 2024-06-01 21:28:32.102470720 -0400
+++ apprise-1.8.0-patched/test/conftest.py 2024-06-01 21:29:32.363754277 -0400
@@ -46,7 +46,7 @@
A_MGR = AttachmentManager()
2022-11-15 20:21:20 +01:00
-@pytest.fixture(scope="function", autouse=True)
+@pytest.fixture(autouse=True)
def mimetypes_always_available():
"""
A pytest session fixture which ensures mimetypes is set correctly
@@ -56,8 +56,8 @@
mimetypes.init(files=files)
-@pytest.fixture(scope="function", autouse=True)
2022-11-15 20:21:20 +01:00
-def no_throttling_everywhere(session_mocker):
+@pytest.fixture(autouse=True)
+def no_throttling_everywhere(mocker):
"""
A pytest session fixture which disables throttling on all notifiers.
It is automatically enabled.
@@ -68,4 +68,4 @@
A_MGR.unload_modules()
for plugin in N_MGR.plugins():
2022-11-15 20:21:20 +01:00
- session_mocker.patch.object(plugin, "request_rate_per_sec", 0)
+ mocker.patch.object(plugin, "request_rate_per_sec", 0)