Beispiel #1
0
    def test_eq(self):
        self.assertEqual(self.addr1, self.addr2.get_addr_obj(""))
        self.assertNotEqual(self.addr1, self.addr2)
        self.assertNotEqual(self.addr1, 3333)

        self.assertEqual(self.addr4, self.addr4.get_addr_obj(""))
        self.assertNotEqual(self.addr4, self.addr5)
        self.assertNotEqual(self.addr4, 3333)
        from certbot.plugins.common import Addr
        self.assertEqual(self.addr4, Addr.fromstring("[fe00:0:0::1]"))
        self.assertEqual(self.addr4, Addr.fromstring("[fe00:0::0:0:1]"))
Beispiel #2
0
    def test_eq(self):
        self.assertEqual(self.addr1, self.addr2.get_addr_obj(""))
        self.assertNotEqual(self.addr1, self.addr2)
        self.assertFalse(self.addr1 == 3333)

        self.assertEqual(self.addr4, self.addr4.get_addr_obj(""))
        self.assertNotEqual(self.addr4, self.addr5)
        self.assertFalse(self.addr4 == 3333)
        from certbot.plugins.common import Addr
        self.assertEqual(self.addr4, Addr.fromstring("[fe00:0:0::1]"))
        self.assertEqual(self.addr4, Addr.fromstring("[fe00:0::0:0:1]"))
Beispiel #3
0
    def test_set_inclusion(self):
        from certbot.plugins.common import Addr
        set_a = {self.addr1, self.addr2}
        addr1b = Addr.fromstring("192.168.1.1")
        addr2b = Addr.fromstring("192.168.1.1:*")
        set_b = {addr1b, addr2b}

        self.assertEqual(set_a, set_b)

        set_c = {self.addr4, self.addr5}
        addr4b = Addr.fromstring("[fe00::1]")
        addr5b = Addr.fromstring("[fe00::1]:*")
        set_d = {addr4b, addr5b}

        self.assertEqual(set_c, set_d)
Beispiel #4
0
    def test_set_inclusion(self):
        from certbot.plugins.common import Addr
        set_a = set([self.addr1, self.addr2])
        addr1b = Addr.fromstring("192.168.1.1")
        addr2b = Addr.fromstring("192.168.1.1:*")
        set_b = set([addr1b, addr2b])

        self.assertEqual(set_a, set_b)

        set_c = set([self.addr4, self.addr5])
        addr4b = Addr.fromstring("[fe00::1]")
        addr5b = Addr.fromstring("[fe00::1]:*")
        set_d = set([addr4b, addr5b])

        self.assertEqual(set_c, set_d)
Beispiel #5
0
 def setUp(self):
     from certbot.plugins.common import Addr
     self.addr1 = Addr.fromstring("192.168.1.1")
     self.addr2 = Addr.fromstring("192.168.1.1:*")
     self.addr3 = Addr.fromstring("192.168.1.1:80")
     self.addr4 = Addr.fromstring("[fe00::1]")
     self.addr5 = Addr.fromstring("[fe00::1]:*")
     self.addr6 = Addr.fromstring("[fe00::1]:80")
     self.addr7 = Addr.fromstring("[fe00::1]:5")
     self.addr8 = Addr.fromstring("[fe00:1:2:3:4:5:6:7:8:9]:8080")
Beispiel #6
0
 def setUp(self):
     from certbot.plugins.common import Addr
     self.addr1 = Addr.fromstring("192.168.1.1")
     self.addr2 = Addr.fromstring("192.168.1.1:*")
     self.addr3 = Addr.fromstring("192.168.1.1:80")
     self.addr4 = Addr.fromstring("[fe00::1]")
     self.addr5 = Addr.fromstring("[fe00::1]:*")
     self.addr6 = Addr.fromstring("[fe00::1]:80")
     self.addr7 = Addr.fromstring("[fe00::1]:5")
     self.addr8 = Addr.fromstring("[fe00:1:2:3:4:5:6:7:8:9]:8080")