File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -99,24 +99,22 @@ def test_check_multigrid_controller_exists(mocker: MockerFixture):
9999
100100
101101@pytest .mark .parametrize ("test_params" , test_upload_gain_reference_params_matrix )
102- @patch ("murfey.instrument_server.api.subprocess" )
103- @patch ("murfey.instrument_server.api.tokens" )
104- @patch ("murfey.instrument_server.api._get_murfey_url" )
105- @patch ("murfey.instrument_server.api.requests" )
106102def test_upload_gain_reference (
107- mock_request ,
108- mock_get_server_url ,
109- mock_tokens ,
110- mock_subprocess ,
103+ mocker : MockerFixture ,
111104 test_params : tuple [Optional [str ]],
112105):
113-
114106 # Unpack test parameters and define other ones
115107 (rsync_url_setting ,) = test_params
116108 server_url = "http://0.0.0.0:8000"
117109 instrument_name = "murfey"
118110 session_id = 1
119111
112+ # Mock out objects
113+ mock_request = mocker .patch ("murfey.instrument_server.api.requests" )
114+ mock_get_server_url = mocker .patch ("murfey.instrument_server.api._get_murfey_url" )
115+ mock_subprocess = mocker .patch ("murfey.instrument_server.api.subprocess" )
116+ mocker .patch ("murfey.instrument_server.api.tokens" , {session_id : ANY })
117+
120118 # Create a mock machine config base on the test params
121119 rsync_module = "data"
122120 gain_ref_dir = "C:/ProgramData/Gatan/Gain Reference"
You can’t perform that action at this time.
0 commit comments