'L{dns._EDNSMessage.toStr} calls L{dns._EDNSMessage._toMessage}'

def test_toStrCallsToMessage(self):

    m = dns._EDNSMessage()
    def fakeToMessage(*args, **kwargs):
        raise RaisedArgs(args, kwargs)
    m._toMessage = fakeToMessage
    e = self.assertRaises(RaisedArgs, m.toStr)
    self.assertEqual(((), {}), (e.args, e.kwargs))
