Пример #1
0
    def test_set_attrib(self):
        node = TemplateSystemNode()
        node.set_attrib("timeout", 1000)
        self.assertEquals(1000, node.timeout)

        with self.assertRaises(ParserException):
            node.set_attrib("unknown", 1000)
Пример #2
0
    def test_set_attrib(self):
        node = TemplateSystemNode()
        node.set_attrib("timeout", TemplateWordNode("1000"))
        self.assertEqual("1000", node._timeout.word)

        with self.assertRaises(ParserException):
            node.set_attrib("unknown", 1000)