def test_validate_network_port_fail(self):
    self.assertRaisesRegex(exception.InvalidParameterValue, 'Port "65536" is not a valid port.', utils.validate_network_port, '65536')
    self.assertRaisesRegex(exception.InvalidParameterValue, 'fake_port "-1" is not a valid port.', utils.validate_network_port, '-1', 'fake_port')
    self.assertRaisesRegex(exception.InvalidParameterValue, 'Port "invalid" is not a valid port.', utils.validate_network_port, 'invalid')
def test_validate_network_port_fail(self):
    self.assertRaisesRegex(exception.InvalidParameterValue, 'Port "65536" is not a valid port.', utils.validate_network_port, '65536')
    self.assertRaisesRegex(exception.InvalidParameterValue, 'fake_port "-1" is not a valid port.', utils.validate_network_port, '-1', 'fake_port')
    self.assertRaisesRegex(exception.InvalidParameterValue, 'Port "invalid" is not a valid port.', utils.validate_network_port, 'invalid')