Ejemplo n.º 1
0
 def test_invalid_port(self):
     # False is returned if the port is not in range.
     for port in (-10, 0, 65536, 100000):
         self.assertFalse(port_in_range(port), port)
Ejemplo n.º 2
0
 def test_invalid_port(self):
     # False is returned if the port is not in range.
     for port in (-10, 0, 65536, 100000):
         self.assertFalse(port_in_range(port), port)
Ejemplo n.º 3
0
 def test_valid_port(self):
     # True is returned if the port is in range.
     for port in (1, 80, 443, 1234, 8080, 54321, 65535):
         self.assertTrue(port_in_range(port), port)
Ejemplo n.º 4
0
 def test_valid_port(self):
     # True is returned if the port is in range.
     for port in (1, 80, 443, 1234, 8080, 54321, 65535):
         self.assertTrue(port_in_range(port), port)