--- a/pvl/hosts/tests.py Thu Feb 26 15:42:01 2015 +0200
+++ b/pvl/hosts/tests.py Thu Feb 26 15:53:57 2015 +0200
@@ -450,18 +450,38 @@
])
def testHostBoot(self):
- host = Host.build('foo', 'test',
- ethernet = '00:11:22:33:44:55',
- boot = 'boot.lan:debian/wheezy/pxelinux.0',
- )
+ hosts = [
+ Host.build('foo1', 'test',
+ ethernet = '00:11:22:33:44:55',
+ boot = 'boot.lan:debian/wheezy/pxelinux.0',
+ ),
+ Host.build('foo2', 'test',
+ ethernet = '00:11:22:33:44:55',
+ boot = 'boot.lan:',
+ ),
+ Host.build('foo3', 'test',
+ ethernet = '00:11:22:33:44:55',
+ boot = '/debian/wheezy/pxelinux.0',
+ ),
+ ]
- self.assertBlocksEqual(list(dhcp.dhcp_host(host)), [
- (('host', 'foo'), [
- ('option', 'host-name', "foo"),
+ self.assertBlocksEqual(list(dhcp.dhcp_hosts(hosts)), [
+ (('host', 'foo1'), [
+ ('option', 'host-name', "foo1"),
('hardware', 'ethernet', '00:11:22:33:44:55'),
('next-server', 'boot.lan'),
('filename', 'debian/wheezy/pxelinux.0'),
- ], None)
+ ], None),
+ (('host', 'foo2'), [
+ ('option', 'host-name', "foo2"),
+ ('hardware', 'ethernet', '00:11:22:33:44:55'),
+ ('next-server', 'boot.lan'),
+ ], None),
+ (('host', 'foo3'), [
+ ('option', 'host-name', "foo3"),
+ ('hardware', 'ethernet', '00:11:22:33:44:55'),
+ ('filename', 'debian/wheezy/pxelinux.0'),
+ ], None),
])
def testHosts(self):