def test_raises_on_undeclared_children(self): children = _Children('test', self.dom, {}, {}) self.assertRaises(AttributeError, lambda: children.some_section)
def test_get_declared_children(self): children = _Children('test', self.dom, {'anys': ('any', self.wrap)}, {}) self.assertEqual(['any.1', 'any.2'], children.anys)
def test_get_declared_section(self): children = _Children( 'test', self.dom, {}, {'some_section': ('some', self.wrap)} ) self.assertEqual('some.0', children.some_section)
def test_get_declared_section(self): children = _Children('test', self.dom, {}, {'some_section': ('some', self.wrap)}) self.assertEqual('some.0', children.some_section)