2 from tests
.baseclass
import *
4 from pykickstart
import constants
5 from pykickstart
import sections
6 from pykickstart
import version
8 class RawSection(sections
.Section
):
11 def __init__(self
, handler
, **kwargs
):
12 sections
.Section
.__init
__(self
, handler
, **kwargs
)
15 def handleLine(self
, line
):
19 self
.handler
.raw
+= line
21 class New_Section_TestCase(ParserTest
):
30 self
.parser
.registerSection(RawSection(self
.parser
.handler
))
31 self
.parser
.readKickstartFromString(self
.ks
)
33 # Verify the contents of the custom section were saved.
34 self
.assertEqual(self
.parser
.handler
.raw
, "1234\nabcd\n")
36 if __name__
== "__main__":