mirror of
https://github.com/caronc/apprise.git
synced 2025-08-15 10:52:36 +02:00
Tests: Use no_throttling
fixture everywhere
This commit is contained in:
@ -212,7 +212,7 @@ def test_plugin_twitter_urls():
|
||||
|
||||
@mock.patch('requests.get')
|
||||
@mock.patch('requests.post')
|
||||
def test_plugin_twitter_general(mock_post, mock_get):
|
||||
def test_plugin_twitter_general(mock_post, mock_get, no_throttling):
|
||||
"""
|
||||
NotifyTwitter() General Tests
|
||||
|
||||
@ -228,9 +228,6 @@ def test_plugin_twitter_general(mock_post, mock_get):
|
||||
'id': 9876,
|
||||
}]
|
||||
|
||||
# Disable Throttling to speed testing
|
||||
plugins.NotifyBase.request_rate_per_sec = 0
|
||||
|
||||
# Epoch time:
|
||||
epoch = datetime.utcfromtimestamp(0)
|
||||
|
||||
@ -423,7 +420,7 @@ def test_plugin_twitter_edge_cases():
|
||||
|
||||
@mock.patch('requests.post')
|
||||
@mock.patch('requests.get')
|
||||
def test_plugin_twitter_dm_attachments(mock_get, mock_post):
|
||||
def test_plugin_twitter_dm_attachments(mock_get, mock_post, no_throttling):
|
||||
"""
|
||||
NotifyTwitter() DM Attachment Checks
|
||||
|
||||
@ -439,9 +436,6 @@ def test_plugin_twitter_dm_attachments(mock_get, mock_post):
|
||||
'id': 9876,
|
||||
}
|
||||
|
||||
# Disable Throttling to speed testing
|
||||
plugins.NotifyBase.request_rate_per_sec = 0
|
||||
|
||||
# Prepare a good DM response
|
||||
good_dm_response = mock.Mock()
|
||||
good_dm_response.content = dumps(good_dm_response_obj)
|
||||
@ -642,7 +636,7 @@ def test_plugin_twitter_dm_attachments(mock_get, mock_post):
|
||||
|
||||
@mock.patch('requests.post')
|
||||
@mock.patch('requests.get')
|
||||
def test_plugin_twitter_tweet_attachments(mock_get, mock_post):
|
||||
def test_plugin_twitter_tweet_attachments(mock_get, mock_post, no_throttling):
|
||||
"""
|
||||
NotifyTwitter() Tweet Attachment Checks
|
||||
|
||||
@ -658,9 +652,6 @@ def test_plugin_twitter_tweet_attachments(mock_get, mock_post):
|
||||
'id': 9876,
|
||||
}
|
||||
|
||||
# Disable Throttling to speed testing
|
||||
plugins.NotifyBase.request_rate_per_sec = 0
|
||||
|
||||
# Prepare a good DM response
|
||||
good_tweet_response = mock.Mock()
|
||||
good_tweet_response.content = dumps(good_tweet_response_obj)
|
||||
|
Reference in New Issue
Block a user