Esempio n. 1
0
 def setUp(self):
     b = declarative_base()
     class Model(Temporal, Common, b):
         name = Column(String, primary_key=True)
     self.Model = Model
     self.session = get_session()
     self.addCleanup(self.session.rollback)
     b.metadata.create_all(self.session.bind)
Esempio n. 2
0
 def setUp(self):
     Base = declarative_base()
     class Booking(Temporal, Common, Base):
         hotel =  Column(String, primary_key=True)
         room =  Column(Integer, primary_key=True)
     self.Booking = Booking
     self.session = get_session()
     self.addCleanup(self.session.rollback)
     Base.metadata.create_all(self.session.bind)