mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
python: Use universal_newlines to get str from subprocess.
We can replace ‘universal_newlines’ with ‘text’ when we bump our minimum Python version to 3.7. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
9281dccae4
commit
aaa7b766d8
@@ -63,7 +63,7 @@ def test_generated_curl_examples_for_success(client: Client) -> None:
|
||||
try:
|
||||
# We split this across two lines so if curl fails and
|
||||
# returns non-JSON output, we'll still print it.
|
||||
response_json = subprocess.check_output(generated_curl_command).decode('utf-8')
|
||||
response_json = subprocess.check_output(generated_curl_command, universal_newlines=True)
|
||||
response = json.loads(response_json)
|
||||
assert(response["result"] == "success")
|
||||
except (AssertionError, Exception):
|
||||
|
||||
Reference in New Issue
Block a user