def test_format_bootif_makes_mac_address_lower(self): fake_mac = factory.make_mac_address("-") fake_mac = fake_mac.upper() self.assertEqual( "01-%s" % fake_mac.replace(":", "-").lower(), format_bootif(fake_mac), )
def test_get_reader_appends_bootif(self): method = PowerNVBootMethod() fake_mac = factory.make_mac_address("-") params = make_kernel_parameters(self, purpose="install") output = method.get_reader(backend=None, kernel_params=params, arch="ppc64el", mac=fake_mac) output = output.read(10000).decode("utf-8") config = parse_pxe_config(output) expected = "BOOTIF=%s" % format_bootif(fake_mac) self.assertIn(expected, config["execute"]["APPEND"])
def test_format_bootif_makes_mac_address_lower(self): fake_mac = factory.make_mac_address("-") fake_mac = fake_mac.upper() self.assertEqual('01-%s' % fake_mac.replace(':', '-').lower(), format_bootif(fake_mac))