def METHOD_NAME(self, env):
    env = ImmutableSandboxedEnvironment()
    pytest.raises(SecurityError, env.from_string("{{ [].append(23) }}").render)
    pytest.raises(SecurityError, env.from_string("{{ {1:2}.clear() }}").render)