def testGetArgFromToken(self):
    # This tests indirectly by going through a few tags known to call
    # _GetArgFromToken. That expedient avoids having to create a token stream
    # at a low level.

    # try a good one
    template = django_template.Template('{% camel_case foo %}')
    context = self._GetContext({'foo': 'hello_world'})
    self.assertEquals('HelloWorld', template.render(context))

    # Missing the arg
    for tag in ['language', 'comment_if', 'doc_comment_if']:
      try:
        template = django_template.Template('{%% %s %%}' % tag)
        self.fail('TemplateSyntaxError not raised')
      except django_template.TemplateSyntaxError as e:
        self.assertEquals(tag % 'tag requires a single argument: %s', str(e))
dataset/ETHPy150Open google/apis-client-generator/src/googleapis/codegen/template_helpers_test.py/TemplateHelpersTest.testGetArgFromToken/swapped operands of `%`