def METHOD_NAME(self):
    start = datetime(2016, 7, 20, 10, 56, 19)
    end = start + timedelta(seconds=35.6)
    self.mock_datetime.utcnow.side_effect = [start, end]
    messages = self.get_log_messages()
    assert len(messages) == 1
    # I'm not using assertDictContainsSubset because it is
    # removed in python 3.2 (because the arguments were backwards)
    # and it wasn't ever replaced by anything *headdesk*
    assert 'duration' in messages[0]
    assert 35.6 == messages[0]['duration']
    assert 'started_at' in messages[0]
    assert start.isoformat(' ') == messages[0]['started_at']
    assert 'ended_at' in messages[0]
    assert end.isoformat(' ') == messages[0]['ended_at']