def test_one_invalid_method(self):

        sr = StaticRules()
        sr.formulae = {
            "eth0": ("ppf", "foobaz"),
        }

        self.assertEqual(sr.write(False), "")
    def test_one_valid(self):

        sr = StaticRules()
        sr.formulae = {
            "eth0": ("ppn", "p1p1"),
        }

        desired_result = "eth0:ppn=\"p1p1\"\n"

        self.assertEqual(sr.write(False), desired_result)
    def test_two_valid(self):

        sr = StaticRules()
        sr.formulae = {
            "eth0": ("ppn", "p1p1"),
            "eth1": ("label", "Ethernet1"),
        }

        desired_result = ("eth0:ppn=\"p1p1\"\n" "eth1:label=\"Ethernet1\"\n")

        self.assertEqual(sr.write(False), desired_result)