mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	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:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							fd6d048efd
						
					
				
				
					commit
					97e4e9886c
				
			@@ -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):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user