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