1- from typing import Optional
2-
31import requests
42
53BASE_URL = "http://127.0.0.1:8080"
@@ -39,7 +37,7 @@ def get(
3937
4038def post (
4139 endpoint : str ,
42- data : Optional [ dict ] = None ,
40+ data : dict | None = None ,
4341 expected_status_code : int = 200 ,
4442 headers : dict = {},
4543 should_check_response : bool = True ,
@@ -135,7 +133,7 @@ def json_patch(
135133
136134def multipart_post (
137135 endpoint : str ,
138- files : Optional [ dict ] = None ,
136+ files : dict | None = None ,
139137 expected_status_code : int = 200 ,
140138 should_check_response : bool = True ,
141139) -> requests .Response :
@@ -157,7 +155,7 @@ def multipart_post(
157155
158156def put (
159157 endpoint : str ,
160- data : Optional [ dict ] = None ,
158+ data : dict | None = None ,
161159 expected_status_code : int = 200 ,
162160 headers : dict = {},
163161 should_check_response : bool = True ,
@@ -180,7 +178,7 @@ def put(
180178
181179def patch (
182180 endpoint : str ,
183- data : Optional [ dict ] = None ,
181+ data : dict | None = None ,
184182 expected_status_code : int = 200 ,
185183 headers : dict = {},
186184 should_check_response : bool = True ,
@@ -203,7 +201,7 @@ def patch(
203201
204202def delete (
205203 endpoint : str ,
206- data : Optional [ dict ] = None ,
204+ data : dict | None = None ,
207205 expected_status_code : int = 200 ,
208206 headers : dict = {},
209207 should_check_response : bool = True ,
@@ -226,7 +224,7 @@ def delete(
226224
227225def head (
228226 endpoint : str ,
229- data : Optional [ dict ] = None ,
227+ data : dict | None = None ,
230228 expected_status_code : int = 200 ,
231229 headers : dict = {},
232230 should_check_response : bool = True ,
@@ -252,7 +250,7 @@ def head(
252250def generic_http_helper (
253251 method : str ,
254252 endpoint : str ,
255- data : Optional [ dict ] = None ,
253+ data : dict | None = None ,
256254 expected_status_code : int = 200 ,
257255 headers : dict = {},
258256 should_check_response : bool = True ,
0 commit comments