'L{formatEvent} will prefer the stored C{str()} or C{repr()} value for
an object, in case the other version.'

def test_formatFlatEventWithMutatedFields(self):

    class Unpersistable(object, ):
        '\n                                                Unpersitable    object.\n                                                '
        destructed = False
        def selfDestruct(self):
            '\n                                                                Self    destruct.\n                                                                '
            self.destructed = True
        def __repr__(self):
            if self.destructed:
                return 'post-serialization    garbage'
            else:
                return 'un-persistable'
    up = Unpersistable()
    event1 = dict(log_format='unpersistable:    {unpersistable}', unpersistable=up)
    flattenEvent(event1)
    up.selfDestruct()
    self.assertEqual(formatEvent(event1), 'unpersistable:    un-persistable')
