def testParseTerm(self): parser = self.Parser('term testy {\ntarget::Test\n}') expected = policy_simple.Term('testy') expected.AddField(policy_simple.Target('Test')) pol = parser.Parse() self.assertEqual(expected, pol.members[0])
def testParseHeader(self): parser = self.Parser('header {\ntarget::Test\n}') expected = policy_simple.Header() expected.AddField(policy_simple.Target('Test')) pol = parser.Parse() self.assertEqual(expected, pol.members[0])