def setUp(self):
self.app = create_app('comment')
self.app_context = self.app.app_context()
self.app_context.push()
db.init_app(self.app)
db.create_all()
table_structs = self.app.config.get('COMMENT_TABLE_STRUCTS')
table_structs = copy.deepcopy(table_structs)
table_structs.pop('__tablename__')
self.proxy = CommentProxy([key for key, value in table_structs.items()])
评论列表
文章目录