mirror of
https://github.com/caronc/apprise.git
synced 2025-08-12 17:47:19 +02:00
Tests: Use global no_throttling_everywhere
fixture (#701)
Instead of needing to individually disable throttling on a per-plugin basis, this fixture takes care of all notifiers in `NOTIFY_MODULE_MAP` automatically. With `autouse=True`, there is no need to activate it manually.
This commit is contained in:
@ -196,8 +196,6 @@ def test_plugin_pushover_attachments(mock_post, tmpdir):
|
||||
NotifyPushover() Attachment Checks
|
||||
|
||||
"""
|
||||
# Disable Throttling to speed testing
|
||||
NotifyPushover.request_rate_per_sec = 0
|
||||
|
||||
# Initialize some generic (but valid) tokens
|
||||
user_key = 'u' * 30
|
||||
@ -315,8 +313,6 @@ def test_plugin_pushover_edge_cases(mock_post):
|
||||
NotifyPushover() Edge Cases
|
||||
|
||||
"""
|
||||
# Disable Throttling to speed testing
|
||||
NotifyPushover.request_rate_per_sec = 0
|
||||
|
||||
# No token
|
||||
with pytest.raises(TypeError):
|
||||
@ -407,9 +403,6 @@ def test_plugin_pushover_config_files(mock_post):
|
||||
tag: pushover_str emerg
|
||||
"""
|
||||
|
||||
# Disable Throttling to speed testing
|
||||
NotifyPushover.request_rate_per_sec = 0
|
||||
|
||||
# Prepare Mock
|
||||
mock_post.return_value = requests.Request()
|
||||
mock_post.return_value.status_code = requests.codes.ok
|
||||
|
Reference in New Issue
Block a user