'Test C{getOutgoingInterface} and C{setOutgoingInterface}.'

def test_interface(self):

    self.assertEqual(self.client.transport.getOutgoingInterface(), '0.0.0.0')
    self.assertEqual(self.server.transport.getOutgoingInterface(), '0.0.0.0')
    d1 = self.client.transport.setOutgoingInterface('127.0.0.1')
    d2 = self.server.transport.setOutgoingInterface('127.0.0.1')
    result = gatherResults([d1, d2])
    def cbInterfaces(ignored):
        self.assertEqual(self.client.transport.getOutgoingInterface(), '127.0.0.1')
        self.assertEqual(self.server.transport.getOutgoingInterface(), '127.0.0.1')
    result.addCallback(cbInterfaces)
    return result
