117 for line, expect in itertools.izip_longest(lines, expected): |
117 for line, expect in itertools.izip_longest(lines, expected): |
118 self.assertEqualWhitespace(line, expect) |
118 self.assertEqualWhitespace(line, expect) |
119 |
119 |
120 def testBuildConf(self): |
120 def testBuildConf(self): |
121 self.assertLinesEqual( |
121 self.assertLinesEqual( |
122 config.build_block(config.Block(('group', ), [ |
122 config.build_block(config.Block(None, [], [ |
|
123 config.Block(('group', ), [ |
123 ('next-server', 'boot.test'), |
124 ('next-server', 'boot.test'), |
124 ('filename', "/debian/wheezy/pxelinux.0"), |
125 ('filename', "/debian/wheezy/pxelinux.0"), |
125 ('include', "hosts/test.conf"), |
126 ('include', "hosts/test.conf"), |
126 ], [ |
127 ], [ |
127 config.Block(('host', 'foo'), [ |
128 config.Block(('host', 'foo'), [ |
128 ('option', 'host-name', "foo.test"), |
129 ('option', 'host-name', "foo.test"), |
129 ('fixed-address', '192.0.2.1'), |
130 ('fixed-address', '192.0.2.1'), |
130 ('hardware', 'ethernet', '00:11:22:33:44:55'), |
131 ('hardware', 'ethernet', '00:11:22:33:44:55'), |
131 ]), |
132 ]), |
132 ] |
133 ]), |
133 )), |
134 ])), |
134 """ |
135 """ |
135 group { |
136 group { |
136 next-server boot.test; |
137 next-server boot.test; |
137 filename "/debian/wheezy/pxelinux.0"; |
138 filename "/debian/wheezy/pxelinux.0"; |
138 include "hosts/test.conf"; |
139 include "hosts/test.conf"; |