File tree Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -734,15 +734,35 @@ async def test_matlab_view_websocket_success(
734734 assert mock_ws_server .pong .call_count == 1
735735
736736
737- async def test_set_licensing_info_put_mhlm (test_server ):
737+ async def test_set_licensing_info_put_mhlm (
738+ mocker ,
739+ test_server ,
740+ set_licensing_info_mock_expand_token ,
741+ set_licensing_info_mock_access_token ,
742+ set_licensing_info_mock_fetch_multiple_entitlements ,
743+ ):
738744 """Test to check endpoint : "/set_licensing_info"
739745
740746 Test which sends HTTP PUT request with MHLM licensing information.
741747 Args:
742748 test_server (aiohttp_client): A aiohttp_client server to send HTTP GET request.
743749 """
744- # FIXME: This test is talking to production loginws endpoint and is resulting in an exception.
745- # TODO: Use mocks to test the mhlm workflows is working as expected
750+
751+ mocker .patch (
752+ "matlab_proxy.app_state.mw.fetch_expand_token" ,
753+ return_value = set_licensing_info_mock_expand_token ,
754+ )
755+
756+ mocker .patch (
757+ "matlab_proxy.app_state.mw.fetch_access_token" ,
758+ return_value = set_licensing_info_mock_access_token ,
759+ )
760+
761+ mocker .patch (
762+ "matlab_proxy.app_state.mw.fetch_entitlements" ,
763+ return_value = set_licensing_info_mock_fetch_multiple_entitlements ,
764+ )
765+
746766 data = {
747767 "type" : "mhlm" ,
748768 "status" : "starting" ,
You can’t perform that action at this time.
0 commit comments