Beispiel #1
0
 def test_validate_port_too_high(self):
     self.assertTrue(validate_port(49151))
     self.assertFalse(validate_port(49152))
Beispiel #2
0
 def test_validate_port_wrong_type(self):
     self.assertFalse(validate_port("1908"))
Beispiel #3
0
 def test_validate_port_too_low(self):
     self.assertFalse(validate_port(-1))
     self.assertTrue(validate_port(0))
Beispiel #4
0
 def test_validate_port(self):
     """
     A port should be an integer within the correct range.
     """
     self.assertTrue(validate_port(1908))