python: Replace universal_newlines with text.

This is supported in Python ≥ 3.7.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-01-21 22:52:54 -08:00
committed by Tim Abbott
parent fd6d048efd
commit 97e4e9886c
28 changed files with 31 additions and 45 deletions

View File

@@ -98,9 +98,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, universal_newlines=True
)
response_json = subprocess.check_output(generated_curl_command, text=True)
response = json.loads(response_json)
assert response["result"] == "success"
except (AssertionError, Exception):