Exemple #1
0
    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)
Exemple #2
0
    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)
Exemple #3
0
    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)
Exemple #4
0
    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)