def test_pinning_encapsulation(self):
        assert not this_thread_is_pinned(), \
            "Thread started out pinned or this_thread_is_pinned() is broken."

        pin_this_thread()
        assert this_thread_is_pinned(), \
            "pin_this_thread() didn't pin the thread."

        unpin_this_thread()
        assert not this_thread_is_pinned(), \
            "Thread remained pinned after unpin_this_thread()."
Create an index using a tablespace
dataset/ETHPy150Open jbalogh/django-multidb-router/multidb/tests.py/PinningTests.test_pinning_encapsulation--crossover with--dataset/ETHPy150Open perseas/Pyrseas/tests/dbobject/test_tablespace.py/ToSqlTestCase.test_create_index