'Assert that two multi-line strings are equal.'

def assertMultiLineEqual(self, first, second, msg=None):

    self.assert_(isinstance(first, basestring), 'First    argument    is    not    a    string')
    self.assert_(isinstance(second, basestring), 'Second    argument    is    not    a    string')
    if (first != second):
        standardMsg = ('\n' + ''.join(difflib.ndiff(first.splitlines(True), second.splitlines(True))))
        self.fail(self._formatMessage(msg, standardMsg))
