def METHOD_NAME(self):
    # Caching functions rely on an active script run ctx
    add_script_run_ctx(threading.current_thread(), create_mock_script_run_ctx())
    mock_sql_return = MagicMock()
    mock_sql_return.to_pandas = MagicMock(return_value="i am a dataframe")
    conn = SnowparkConnection("my_snowpark_connection")
    conn._instance.sql.return_value = mock_sql_return
    assert conn.query("SELECT 1;") == "i am a dataframe"
    assert conn.query("SELECT 1;") == "i am a dataframe"
    conn._instance.sql.assert_called_once()