def test_transaction_with_exception(self): store = get_store() count1 = store.find(Receiver).count() yield self.assertFailure(self._transact_with_exception(), Exception) store = get_store() count2 = store.find(Receiver).count() self.assertEqual(count1, count2)
def test_transact_with_stuff(self): yield self._transact_with_success() # now check data actually written store = get_store() self.assertEqual(store.find(Counter).count(), 1)
def test_transact_with_stuff(self): receiver_id = yield self._transact_with_success() # now check data actually written store = get_store() self.assertEqual(store.find(Receiver).count(), 1)