1- # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
1+ # SPDX-FileCopyrightText: 2024 Justin Myers
22#
33# SPDX-License-Identifier: Unlicense
44
5- """ Post Tests """
5+ """ Post Files Tests """
66# pylint: disable=line-too-long
77
88import re
@@ -53,7 +53,7 @@ def get_actual_request_data(log_stream):
5353 if "Content-Disposition" in log_arg :
5454 # this will look like:
5555 # b\'{content}\'
56- # and escapped characters look like:
56+ # and escaped characters look like:
5757 # \\r
5858 post_data = log_arg [2 :- 1 ]
5959 post_bytes = post_data .encode ("utf-8" )
@@ -70,7 +70,7 @@ def test_post_files_text( # pylint: disable=unused-argument
7070 "key_4" : (None , "Value 5" ),
7171 }
7272
73- python_requests .post (post_url , files = file_data )
73+ python_requests .post (post_url , files = file_data , timeout = 30 )
7474 boundary , content_length , actual_request_post = get_actual_request_data (log_stream )
7575
7676 requests ._build_boundary_string = mock .Mock (return_value = boundary )
@@ -115,7 +115,7 @@ def test_post_files_file( # pylint: disable=unused-argument
115115 ),
116116 }
117117
118- python_requests .post (post_url , files = file_data )
118+ python_requests .post (post_url , files = file_data , timeout = 30 )
119119 boundary , content_length , actual_request_post = get_actual_request_data (
120120 log_stream
121121 )
@@ -170,7 +170,7 @@ def test_post_files_complex( # pylint: disable=unused-argument
170170 "key_6" : (None , "Value 6" ),
171171 }
172172
173- python_requests .post (post_url , files = file_data )
173+ python_requests .post (post_url , files = file_data , timeout = 30 )
174174 boundary , content_length , actual_request_post = get_actual_request_data (
175175 log_stream
176176 )
0 commit comments