def setUp(self): import datetime tables.set_now_func(datetime.datetime.utcnow) self.session = create_session()
def tearDown(self): from nowin_core.database import tables tables.set_now_func(self.oldNowFunc) self.session.remove()
def setUp(self): import datetime from nowin_core.database import tables from nowin_core.tests.models._helper import create_session tables.set_now_func(datetime.datetime.utcnow) self.session = create_session(zope_transaction=True)
def setUp(self): from nowin_core.database import tables from nowin_core.tests.models._helper import create_session self.session = create_session() self.now_func = MockNow() self.oldNowFunc = tables.set_now_func(self.now_func)