Call setup and teardown functions on the correct context