Tests: Use no_throttling fixture everywhere

This commit is contained in:
Andreas Motl
2022-10-09 02:01:50 +02:00
parent 85daf12fbd
commit c797d1e2eb
48 changed files with 105 additions and 267 deletions

View File

@ -176,13 +176,11 @@ def test_plugin_msteams_urls():
@mock.patch('requests.post')
def test_plugin_msteams_templating(mock_post, tmpdir):
def test_plugin_msteams_templating(mock_post, tmpdir, no_throttling):
"""
NotifyMSTeams() Templating
"""
# Disable Throttling to speed testing
plugins.NotifyBase.request_rate_per_sec = 0
# Prepare Mock
mock_post.return_value = requests.Request()
@ -387,15 +385,12 @@ def test_plugin_msteams_templating(mock_post, tmpdir):
@pytest.mark.skipif(
hasattr(sys, "pypy_version_info"), reason="Does not work reliably on PyPy")
@mock.patch('requests.post')
def test_msteams_yaml_config(mock_post, tmpdir):
def test_msteams_yaml_config(mock_post, tmpdir, no_throttling):
"""
NotifyMSTeams() YAML Configuration Entries
"""
# Disable Throttling to speed testing
plugins.NotifyBase.request_rate_per_sec = 0
# Prepare Mock
mock_post.return_value = requests.Request()
mock_post.return_value.status_code = requests.codes.ok