Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions tests/utils/test_http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import platform
from unittest import TestCase, mock

from requests import Session

from launchable.utils.http_client import _HttpClient
from launchable.version import __version__

Expand Down Expand Up @@ -45,19 +43,3 @@ def test_header(self):
"dummy",
),
})

def test_reason(self):
'''make sure we correctly propagate error message from the server'''

# use new session to disable retry
cli = _HttpClient(session=Session())
# /raise_error is an actual endpoint that exists on our service to test the behavior
res = cli.request("GET", "intake/raise_error")
self.assertEqual(res.status_code, 500)
self.assertEqual(res.reason, "Welp")

try:
res.raise_for_status()
self.fail("should have raised")
except Exception as e:
self.assertIn("Welp", str(e))
Loading