mirror of
https://github.com/caronc/apprise.git
synced 2025-08-14 10:28:38 +02:00
Tests: Use no_throttling
fixture everywhere
This commit is contained in:
@ -207,13 +207,11 @@ def test_plugin_fcm_urls():
|
||||
@pytest.mark.skipif(
|
||||
hasattr(sys, "pypy_version_info"), reason="Does not work reliably on PyPy")
|
||||
@mock.patch('requests.post')
|
||||
def test_plugin_fcm_general_legacy(mock_post):
|
||||
def test_plugin_fcm_general_legacy(mock_post, no_throttling):
|
||||
"""
|
||||
NotifyFCM() General Legacy/APIKey Checks
|
||||
|
||||
"""
|
||||
# Disable Throttling to speed testing
|
||||
plugins.NotifyBase.request_rate_per_sec = 0
|
||||
|
||||
# Prepare a good response
|
||||
response = mock.Mock()
|
||||
@ -334,7 +332,7 @@ def test_plugin_fcm_general_legacy(mock_post):
|
||||
@pytest.mark.skipif(
|
||||
'cryptography' not in sys.modules, reason="Requires cryptography")
|
||||
@mock.patch('requests.post')
|
||||
def test_plugin_fcm_general_oauth(mock_post):
|
||||
def test_plugin_fcm_general_oauth(mock_post, no_throttling):
|
||||
"""
|
||||
NotifyFCM() General OAuth Checks
|
||||
|
||||
@ -343,9 +341,6 @@ def test_plugin_fcm_general_oauth(mock_post):
|
||||
# Valid Keyfile
|
||||
path = os.path.join(PRIVATE_KEYFILE_DIR, 'service_account.json')
|
||||
|
||||
# Disable Throttling to speed testing
|
||||
plugins.NotifyBase.request_rate_per_sec = 0
|
||||
|
||||
# Prepare a good response
|
||||
response = mock.Mock()
|
||||
response.content = json.dumps({
|
||||
@ -853,13 +848,11 @@ def test_plugin_fcm_cryptography_import_error():
|
||||
@pytest.mark.skipif(
|
||||
'cryptography' not in sys.modules, reason="Requires cryptography")
|
||||
@mock.patch('requests.post')
|
||||
def test_plugin_fcm_edge_cases(mock_post):
|
||||
def test_plugin_fcm_edge_cases(mock_post, no_throttling):
|
||||
"""
|
||||
NotifyFCM() Edge Cases
|
||||
|
||||
"""
|
||||
# Disable Throttling to speed testing
|
||||
plugins.NotifyBase.request_rate_per_sec = 0
|
||||
|
||||
# Prepare a good response
|
||||
response = mock.Mock()
|
||||
|
Reference in New Issue
Block a user