# Path: wallace/db.py
# def sessions_scope(local_session, commit=False):
# def scoped_session_decorator(func):
#     def wrapper(*args, **kwargs):
# def init_db(drop_all=False):


from wallace import db
        from wallace.recruiters import Recruiter
        from wallace.recruiters import PsiTurkRecruiter
        from wallace.recruiters import SimulatedRecruiter
import os


class TestRecruiters(object):

    def setup(self):
        self.db = db.init_db(drop_all=True)
        os.chdir(os.path.join("examples", "bartlett1932"))

    def teardown(self):
        self.db.rollback()
        self.db.close()
        os.chdir("..")
        os.chdir("..")

    def add(self, *args):
        self.db.add_all(args)
        self.db.commit()

    def test_recruiter_generic(self):
        assert Recruiter()

    def test_recruiter_psiturk(self):

# Path: wallace/db.py
# def sessions_scope(local_session, commit=False):
# def scoped_session_decorator(func):
#     def wrapper(*args, **kwargs):
# def init_db(drop_all=False):


# Path: tests/test_recruiters.py
from wallace import db
        from wallace.recruiters import Recruiter
        from wallace.recruiters import PsiTurkRecruiter
        from wallace.recruiters import SimulatedRecruiter
import os



class TestRecruiters(object):

    def setup(self):
        self.db = db.init_db(drop_all=True)
        os.chdir(os.path.join("examples", "bartlett1932"))

    def teardown(self):
        self.db.rollback()
        self.db.close()
        os.chdir("..")
        os.chdir("..")

    def add(self, *args):
        self.db.add_all(args)
        self.db.commit()

    def test_recruiter_generic(self):
        assert Recruiter()

    def test_recruiter_psiturk(self):

        assert PsiTurkRecruiter()