def METHOD_NAME(self):
    env = SandboxedEnvironment()
    self.assert_raises(TemplateSyntaxError, env.from_string,
                  "{% for item.attribute in seq %}...{% endfor %}")
    self.assert_raises(TemplateSyntaxError, env.from_string,
                  "{% for foo, bar.baz in seq %}...{% endfor %}")