Beispiel #1
0
    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])
Beispiel #2
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])