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:
Andreas Motl
2022-10-16 16:48:44 +02:00
committed by GitHub
parent ed876d1ca2
commit c81d2465e4
61 changed files with 100 additions and 150 deletions

View File

@ -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'