def test_formatFlatEventWithMutatedFields(self):
        class Unpersistable(object):
            """
            Unpersitable object.
            """
            destructed = False

            def selfDestruct(self):
                """
                Self destruct.
                """
                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")
Assemble only the first transaction that matches the criteria from DB
dataset/ETHPy150Open twisted/twisted/twisted/logger/test/test_flatten.py/FlatFormattingTests.test_formatFlatEventWithMutatedFields--crossover with--dataset/ETHPy150Open owtf/owtf/framework/db/transaction_manager.py/TransactionManager.GetFirst