'Writing to a hostname instead of an IP address will raise an
L{InvalidAddressError}.'

def test_writingToHostnameRaisesInvalidAddressError(self):

    reactor = self.buildReactor()
    port = self.getListeningPort(reactor, DatagramProtocol())
    self.assertRaises(error.InvalidAddressError, port.write, 'spam', ('example.invalid', 1))
