'Check that C{target} object has the C{expected} docstring lines.
@param target: Object which is checked.
@type target: C{anything}
@param expected: List of lines, ignoring empty lines or leading or
trailing spaces.
@type expected: L{list} or L{str}'

def assertDocstring(self, target, expected):

    self.assertEqual(expected, [x.strip() for x in target.__doc__.splitlines() if x.strip()])
