def test_is_valid_port(self):
        self.assertTrue(network_util.is_valid_port(1))
        self.assertTrue(network_util.is_valid_port(2**16 - 1))

        self.assertFalse(network_util.is_valid_port(0))
        self.assertFalse(network_util.is_valid_port(2**16))
示例#2
0
    def test_is_valid_port(self):
        self.assertTrue(network_util.is_valid_port(1))
        self.assertTrue(network_util.is_valid_port(65335))

        self.assertFalse(network_util.is_valid_port(-1))
        self.assertFalse(network_util.is_valid_port(70000))
示例#3
0
    def test_is_valid_port(self):
        self.assertTrue(network_util.is_valid_port(1))
        self.assertTrue(network_util.is_valid_port(2**16 - 1))

        self.assertFalse(network_util.is_valid_port(0))
        self.assertFalse(network_util.is_valid_port(2**16))
    def test_is_valid_port(self):
        self.assertTrue(network_util.is_valid_port(1))
        self.assertTrue(network_util.is_valid_port(65335))

        self.assertFalse(network_util.is_valid_port(-1))
        self.assertFalse(network_util.is_valid_port(70000))