mirror of
https://github.com/caronc/apprise.git
synced 2025-08-10 00:38:02 +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:
@ -267,8 +267,6 @@ def test_plugin_slack_oauth_access_token(mock_post):
|
||||
NotifySlack() OAuth Access Token Tests
|
||||
|
||||
"""
|
||||
# Disable Throttling to speed testing
|
||||
NotifySlack.request_rate_per_sec = 0
|
||||
|
||||
# Generate an invalid bot token
|
||||
token = 'xo-invalid'
|
||||
@ -390,8 +388,6 @@ def test_plugin_slack_webhook_mode(mock_post):
|
||||
NotifySlack() Webhook Mode Tests
|
||||
|
||||
"""
|
||||
# Disable Throttling to speed testing
|
||||
NotifySlack.request_rate_per_sec = 0
|
||||
|
||||
# Prepare Mock
|
||||
mock_post.return_value = requests.Request()
|
||||
@ -438,8 +434,6 @@ def test_plugin_slack_send_by_email(mock_get, mock_post):
|
||||
NotifySlack() Send by Email Tests
|
||||
|
||||
"""
|
||||
# Disable Throttling to speed testing
|
||||
NotifySlack.request_rate_per_sec = 0
|
||||
|
||||
# Generate a (valid) bot token
|
||||
token = 'xoxb-1234-1234-abc124'
|
||||
|
Reference in New Issue
Block a user