Skip to content

Commit b9bc81d

Browse files
committed
Eliminate uses of requests library in service/test_app_logging.py (#7633)
1 parent af6f0cd commit b9bc81d

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

test/service/test_app_logging.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
patch,
1212
)
1313

14-
import requests
15-
1614
from azul import (
1715
Config,
1816
)
@@ -85,9 +83,9 @@ def filter_body(organ: str) -> JSON:
8583
'content-type': 'application/json',
8684
**request_headers
8785
}
88-
response = requests.get(str(url),
89-
headers=request_headers,
90-
json=body_json)
86+
response = self.http().request('GET', str(url),
87+
json=body_json,
88+
headers=request_headers)
9189
logs = [(r.levelno, r.getMessage()) for r in logs.records]
9290
body_log_level, body_log_message = logs.pop() # asserted separately
9391
request_headers = {
@@ -158,4 +156,4 @@ def filter_body(organ: str) -> JSON:
158156
assert False
159157
self.assertEqual(expected_log, body_log_message)
160158
self.assertEqual(INFO, body_log_level)
161-
self.assertEqual(200, response.status_code)
159+
self.assertEqual(200, response.status)

0 commit comments

Comments
 (0)