def METHOD_NAME():
    """
    Test that 'connection' property does not allow setting a new connection
    (which could invalidate internal state)
    """
    query = APIQuery(connection=Mock(), parameters={"query_kind": "dummy_query"})
    with pytest.raises(AttributeError, match="can't set attribute"):
        query.connection = "NEW_CONNECTION"