def prepare(self):
self.instance_ctl = mock.Mock()
self.volume_ctl = mock.Mock()
self.volume_type_ctl = mock.Mock()
self.entity_ctl = mock.Mock()
self.app_ctl = mock.Mock()
self.auth_adapter = mock.Mock()
routes.instance_ctl = self.instance_ctl
routes.volume_ctl = self.volume_ctl
routes.volume_type_ctl = self.volume_type_ctl
routes.entity_ctl = self.entity_ctl
routes.app_ctl = self.app_ctl
routes.auth_adapter = self.auth_adapter
self.app = flask.Flask("almanach")
self.app.register_blueprint(routes.api)
评论列表
文章目录