示例#1
0
文件: tests.py 项目: x4rMa/kifu
 def setUp(self):
     self.config = testing.setUp()
     from sqlalchemy import create_engine
     engine = create_engine('sqlite://')
     from default.models.mymodel import (
         Base,
         MyModel,
     )
     DBSession.configure(bind=engine)
示例#2
0
文件: tests.py 项目: mazz/kifu
 def setUp(self):
     self.config = testing.setUp()
     from sqlalchemy import create_engine
     engine = create_engine('sqlite://')
     from default.models.mymodel import (
         Base,
         MyModel,
         )
     DBSession.configure(bind=engine)
示例#3
0
文件: tests.py 项目: x4rMa/kifu
 def setUp(self):
     self.config = testing.setUp()
     from sqlalchemy import create_engine
     engine = create_engine('sqlite://')
     from default.models.mymodel import (
         Base,
         MyModel,
     )
     DBSession.configure(bind=engine)
     Base.metadata.create_all(engine)
     with transaction.manager:
         model = MyModel(name='one', value=55)
         DBSession.add(model)
示例#4
0
文件: tests.py 项目: mazz/kifu
 def setUp(self):
     self.config = testing.setUp()
     from sqlalchemy import create_engine
     engine = create_engine('sqlite://')
     from default.models.mymodel import (
         Base,
         MyModel,
         )
     DBSession.configure(bind=engine)
     Base.metadata.create_all(engine)
     with transaction.manager:
         model = MyModel(name='one', value=55)
         DBSession.add(model)
示例#5
0
文件: tests.py 项目: x4rMa/kifu
 def tearDown(self):
     DBSession.remove()
     testing.tearDown()
示例#6
0
文件: tests.py 项目: mazz/kifu
 def tearDown(self):
     DBSession.remove()
     testing.tearDown()