File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ def mock_analysis_jres(
8080 self ,
8181 body : Optional [list [dict ]] = None ,
8282 status : int = 200 ,
83+ os_matcher : Optional [str ] = "linux" ,
84+ arch_matcher : Optional [str ] = "x86_64" ,
8385 ) -> responses .BaseResponse :
8486 return self .rsps .get (
8587 url = f"{ self .api_url } /analysis/jres" ,
Original file line number Diff line number Diff line change @@ -317,12 +317,19 @@ def test_get_analysis_jres(self):
317317 ),
318318 ]
319319
320- with self .subTest ("get_analysis_jres works" ), sq_api_mocker () as mocker :
320+ with self .subTest ("get_analysis_jres works (linux) " ), sq_api_mocker () as mocker :
321321 mocker .mock_analysis_jres ([sq_api_utils .jre_to_dict (jre ) for jre in expected_jres ])
322322
323323 actual_jres = self .sq .get_analysis_jres (os = "linux" , arch = "x86_64" )
324324 self .assertEqual (actual_jres , expected_jres )
325325
326+ with self .subTest ("get_analysis_jres works (windows)" ), sq_api_mocker () as mocker :
327+ mock = mocker .mock_analysis_jres (
328+ [sq_api_utils .jre_to_dict (jre ) for jre in expected_jres ], os_matcher = "windows" , arch_matcher = "x86"
329+ )
330+ actual_jres = self .sq .get_analysis_jres (os = "windows" , arch = "x86" )
331+ self .assertEqual (actual_jres , expected_jres )
332+
326333 with (
327334 self .subTest ("get_analysis_jres returns error" ),
328335 sq_api_mocker () as mocker ,
You can’t perform that action at this time.
0 commit comments