Пример #1
0
 def setUp(self):
     # Create tables
     metadata.drop_all()
     metadata.create_all()
     user1 = User() 
     user1.user_name='bobvilla'
     user1.email_address='*****@*****.**'
     user1.display_name='Bob Villa'
     user1.password='******'   
     session.save(user1)
     u2 = User()
     u2.user_name='bobathome'
     u2.email_address='*****@*****.**'
     u2.display_name='Bob Villa'
     u2.password='******'
     session.save(u2) 
     session.flush()
     print 'UuUuUuU %s' % user1
     self.user1 = user1
     session.clear()
     session.close()
Пример #2
0
 def tearDown(self):
     metadata.drop_all()