

def test_token_parsing(self):
    p = TokenParser('tag thevar|filter sometag')
    self.assertEqual(p.tagname, 'tag')
    self.assertEqual(p.value(), 'thevar|filter')
    self.assertTrue(p.more())
    self.assertEqual(p.tag(), 'sometag')
    self.assertFalse(p.more())
    p = TokenParser('tag "a value"|filter sometag')
    self.assertEqual(p.tagname, 'tag')
    self.assertEqual(p.value(), '"a value"|filter')
    self.assertTrue(p.more())
    self.assertEqual(p.tag(), 'sometag')
    self.assertFalse(p.more())
    p = TokenParser("tag 'a value'|filter sometag")
    self.assertEqual(p.tagname, 'tag')
    self.assertEqual(p.value(), "'a value'|filter")
    self.assertTrue(p.more())
    self.assertEqual(self.tag(), 'sometag')
    self.assertFalse(p.more())

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/tests/regressiontests/templates/parser.py ParserTests.test_token_parsing/VarMisuse@188/271 `p`->`self`