# Path: apiritif/thread.py
# def get_transaction_handlers():
#     transaction_handlers = get_from_thread_store('transaction_handlers')
#     return transaction_handlers
# 
# def set_transaction_handlers(handlers):
#     put_into_thread_store(transaction_handlers=handlers)


import unittest
import apiritif
from apiritif import get_transaction_handlers, set_transaction_handlers

class Driver(object):
    def get(self, addr):
        pass

    def quit(self):
        pass


class TestSmartTransactions(unittest.TestCase):
    def setUp(self):
        self.driver = None
        self.driver = Driver()
        add_dummy_handlers()
        self.vars = {

        }

        apiritif.put_into_thread_store(
            driver=self.driver,
            func_mode=False)  # don't stop after failed test case

    def _1_t1(self):
        with apiritif.smart_transaction('t1'):
            self.driver.get('addr1')

    def _2_t2(self):
        with apiritif.smart_transaction('t2'):
            self.driver.get('addr2')


# Path: apiritif/thread.py
# def get_transaction_handlers():
#     transaction_handlers = get_from_thread_store('transaction_handlers')
#     return transaction_handlers
# 
# def set_transaction_handlers(handlers):
#     put_into_thread_store(transaction_handlers=handlers)


# Path: tests/resources/test_smart_transactions.py
import unittest
import apiritif
from apiritif import get_transaction_handlers, set_transaction_handlers


class Driver(object):
    def get(self, addr):
        pass

    def quit(self):
        pass


class TestSmartTransactions(unittest.TestCase):
    def setUp(self):
        self.driver = None
        self.driver = Driver()
        add_dummy_handlers()
        self.vars = {

        }

        apiritif.put_into_thread_store(
            driver=self.driver,
            func_mode=False)  # don't stop after failed test case

    def _1_t1(self):
        with apiritif.smart_transaction('t1'):
            self.driver.get('addr1')

    def _2_t2(self):
        with apiritif.smart_transaction('t2'):
            self.driver.get('addr2')


    def _3_t3(self):