Skip to content

Commit

Permalink
modify test
Browse files Browse the repository at this point in the history
  • Loading branch information
appdevjohn committed Jan 30, 2024
1 parent bee2713 commit 3659b4a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/test_gravity_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3659b4a

Please sign in to comment.