

def test_variable_parsing(self):
    c = {
        'article': {
            'section': 'News',
        },
    }
    self.assertEqual(Variable('article.section').resolve(c), 'News')
    self.assertEqual(Variable('"News"').resolve(c), 'News')
    self.assertEqual(Variable("'News'").resolve(c), 'News')
    self.assertEqual(Variable('_(article.section)').resolve(c), 'News')
    self.assertEqual(Variable('_("Good News")').resolve(c), 'Good News')
    self.assertEqual(Variable("_('Better News')").resolve(c), 'Better News')
    self.assertEqual(Variable('"Some \\"Good\\" News"').resolve(self), 'Some "Good" News')
    self.assertEqual(Variable("'Some \\'Better\\' News'").resolve(c), "Some 'Better' News")
    self.assertRaises(TemplateSyntaxError, Variable, 'article._hidden')

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/tests/regressiontests/templates/parser.py ParserTests.test_variable_parsing/VarMisuse@141/206 `c`->`self`