mirror of
https://github.com/caronc/apprise.git
synced 2025-08-15 02:42:35 +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:
@ -212,9 +212,6 @@ def test_plugin_telegram_urls():
|
||||
|
||||
"""
|
||||
|
||||
# Disable Throttling to speed testing
|
||||
NotifyTelegram.request_rate_per_sec = 0
|
||||
|
||||
# Run our general tests
|
||||
AppriseURLTester(tests=apprise_url_tests).run_all()
|
||||
|
||||
@ -226,9 +223,6 @@ def test_plugin_telegram_general(mock_post):
|
||||
|
||||
"""
|
||||
|
||||
# Disable Throttling to speed testing
|
||||
NotifyTelegram.request_rate_per_sec = 0
|
||||
|
||||
# Bot Token
|
||||
bot_token = '123456789:abcdefg_hijklmnop'
|
||||
invalid_bot_token = 'abcd:123'
|
||||
@ -542,9 +536,6 @@ def test_plugin_telegram_formatting(mock_post):
|
||||
NotifyTelegram() formatting tests
|
||||
"""
|
||||
|
||||
# Disable Throttling to speed testing
|
||||
NotifyTelegram.request_rate_per_sec = 0
|
||||
|
||||
# Prepare Mock
|
||||
mock_post.return_value = requests.Request()
|
||||
mock_post.return_value.status_code = requests.codes.ok
|
||||
@ -885,9 +876,6 @@ def test_plugin_telegram_html_formatting(mock_post):
|
||||
"""
|
||||
# on't send anything other than <b>, <i>, <a>,<code> and <pre>
|
||||
|
||||
# Disable Throttling to speed testing
|
||||
NotifyTelegram.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