示例#1
0
 def setUp(self):
     import datetime
     tables.set_now_func(datetime.datetime.utcnow)
     self.session = create_session()
示例#2
0
 def tearDown(self):
     from nowin_core.database import tables
     tables.set_now_func(self.oldNowFunc)
     self.session.remove()
示例#3
0
 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)
示例#4
0
 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)