def test_merge_ip(self): from pyanaconda.bootloader import Arguments # test that _merge_ip() doesnt break the simple case: a = Arguments(["one", "two", "ip=eth0:dhcp"]) a._merge_ip() self.assertEqual(a, Arguments(["one", "two", "ip=eth0:dhcp"])) # test that it does what it's supposed to: a = Arguments(["one", "two", "ip=eth0:dhcp", "ip=eth0:auto6", "ip=wlan0:dhcp", "ip=10.34.102.102::10.34.39.255:24:aklab:eth2:none"]) a._merge_ip() self.assertEqual(a, set([ "one", "two", "ip=wlan0:dhcp", "ip=10.34.102.102::10.34.39.255:24:aklab:eth2:none", "ip=eth0:auto6,dhcp"]))