def test_dirty_protection(self):

        Session.flush()  # should not throw an exception

        serialized_call(lambda: None)()

        Session.flush()  # nothing happened, no exception

        serialized_call(add_something)()

        self.assertRaises(DirtyReadOnlySession, lambda: Session.flush)
Exemple #2
0
    def test_dirty_protection(self):

        Session.flush()  # should not throw an exception

        serialized_call(lambda: None)()

        Session.flush()  # nothing happened, no exception

        serialized_call(add_something)()

        self.assertRaises(DirtyReadOnlySession, lambda: Session.flush)