From 3659b4a18513af2e37dfd9b6cab9578111e9710d Mon Sep 17 00:00:00 2001 From: John Champion Date: Tue, 30 Jan 2024 09:42:49 -0500 Subject: [PATCH] modify test --- tests/test_gravity_forms.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/test_gravity_forms.py b/tests/test_gravity_forms.py index e42d15a..08fed2e 100644 --- a/tests/test_gravity_forms.py +++ b/tests/test_gravity_forms.py @@ -16,14 +16,12 @@ def test_environment_variable_error(): def test_request_exception_get(caplog): with patch("requests_oauthlib.OAuth1Session.get") as mock_get: + mock_get.side_effect = RequestException("Simulated request exception.") gravity_forms = GravityForms( consumer_key="your_key", consumer_secret="your_secret", base_url="https://baseurl.edu" ) - mock_get.side_effect = RequestException("Simulated request exception.") - print(f"1 - {caplog.text}") with pytest.raises(RequestException): gravity_forms.get("/forms") - print(f"2 - {caplog.text}") assert "Simulated request exception." in caplog.text