def test_run_json_load(mocker, mock_user_config, template_name, context, replay_test_dir, replay_file):
 spy_get_replay_file = mocker.spy(replay, 'get_file_name')
 mock_json_load = mocker.patch('json.load', side_effect=json.load)
 loaded_context = replay.load(replay_test_dir, template_name)
 assert (not mock_user_config.called)
 spy_get_replay_file.assert_called_once_with(replay_test_dir, template_name)
 assert (mock_json_load.call_count == 1)
 ((infile_handler,), kwargs) = mock_json_load.call_args
 assert (infile_handler.name == replay_file)
 assert (loaded_context == context)

def test_run_json_load ( mocker , mock_user_config , template_name , context , replay_test_dir , replay_file ) : spy_get_replay_file = mocker . spy ( replay , 'get_file_name' ) mock_json_load = mocker . patch ( 'json.load' , side_effect = json . load ) loaded_context = replay . load ( replay_test_dir , template_name ) assert ( not mock_user_config . called ) spy_get_replay_file . assert_called_once_with ( replay_test_dir , template_name ) assert ( mock_json_load . call_count == 1 ) ( ( infile_handler , ) , kwargs ) = mock_json_load . call_args assert ( infile_handler . name == replay_file ) assert ( loaded_context == context )
test that replay .