示例#1
0
文件: test_api.py 项目: Rdbaker/Rank
 def tearDown(self):
     # DB.session.close()
     # DB.drop_all()
     # DB.session.remove()
     for table in reversed(DB.metadata.sorted_tables):
         DB.session.execute(table.delete())
     # DB.session.add_all(self.starting_data)
     DB.session.commit()
     DB.drop_all()
     pass
示例#2
0
 def tearDown(self):
     # DB.session.close()
     # DB.drop_all()
     # DB.session.remove()
     for table in reversed(DB.metadata.sorted_tables):
         DB.session.execute(table.delete())
     # DB.session.add_all(self.starting_data)
     DB.session.commit()
     DB.drop_all()
     pass
示例#3
0
文件: test_api.py 项目: Rdbaker/Rank
 def setUp(self):
     self.app = self.create_app()
     self.client = self.app.test_client()
     # only run the following few lines once
     DB.drop_all()
     DB.create_all()
     for table in reversed(DB.metadata.sorted_tables):
         DB.session.execute(table.delete())
     DB.session.add_all(self.starting_games)
     DB.session.commit()
     # DB.session.add_all(self.starting_data)
     DB.session.commit()
示例#4
0
 def setUp(self):
     self.app = self.create_app()
     self.client = self.app.test_client()
     # only run the following few lines once
     DB.drop_all()
     DB.create_all()
     for table in reversed(DB.metadata.sorted_tables):
         DB.session.execute(table.delete())
     DB.session.add_all(self.starting_games)
     DB.session.commit()
     # DB.session.add_all(self.starting_data)
     DB.session.commit()