'Assert that two datetimes are nearly equal within a small delta.
:param delta: Maximum allowable time delta, defined in seconds.'

def assertCloseEnoughForGovernmentWork(self, a, b, delta=3):

    if (a == b):
        return
    msg = ('%s    !=    %s    within    %s    delta' % (a, b, delta))
    self.assertLessEqual(abs((a - b)).seconds, delta, msg)
