'An implementation of L{IReactorSocket.adoptDatagramPort} raises
L{UnsupportedAddressFamily} if passed an address family it does not
support.'

def test_invalidAddressFamily(self):

    reactor = self.buildReactor()
    port = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    self.addCleanup(port.close)
    arbitrary = ((2 ** 16) + 7)
    self.assertRaises(UnsupportedAddressFamily, reactor.adoptDatagramPort, port.fileno(), arbitrary, DatagramProtocol())
