def __init__(self, context: BolinetteContext, loop: AbstractEventLoop): abc.WithContext.__init__(self, context) WithDataContext.__init__(self, context.registry.get(DataContext)) server = test_utils.TestServer(context.registry.get(Application), loop=loop) self.client = test_utils.TestClient(server, loop=loop) self.mock = Mock(context) self.cookies = {}
def __init__(self, name, context: BolinetteContext): abc.WithContext.__init__(self, context) WithDataContext.__init__(self, context.registry.get(DataContext)) self.name = name self.model: Model = self.context.inject.require( "model", self.name, immediate=True ) self.database = self.data_ctx.db[self.model.__blnt__.database] self._fields = {}
def __init__( self, context: BolinetteContext, data_ctx: DataContext, web_ctx: WebContext ): abc.WithContext.__init__(self, context) WithDataContext.__init__(self, data_ctx) WithWebContext.__init__(self, web_ctx) self.swagger_path = self.context.instance_path("swagger.yaml") self._path_param_regex = re.compile(r"{([^}]*)}") self._response_regex = re.compile( r"^-response ([\d]{3})(?: ([^:]*))?(?:: ?(.*))?$" ) self._response_type_regex = re.compile(r"file\[([^]]*)]") self._response_returns_regex = re.compile(r"returns") self._type_map = { types.db.Integer: {"type": "integer"}, types.db.Boolean: {"type": "boolean"}, types.db.String: {"type": "string"}, types.db.Email: {"type": "string", "format": "email"}, types.db.Float: {"type": "number", "format": "float"}, types.db.Date: {"type": "string", "format": "date-time"}, types.db.Password: {"type": "string", "format": "password"}, }
def __init__(self, context: BolinetteContext, data_ctx: DataContext, model: Model[T_Entity]): abc.WithContext.__init__(self, context) WithDataContext.__init__(self, data_ctx) self._model = model self._query_builder = self._get_query_builder(model)
def __init__(self, context: BolinetteContext, data_ctx: DataContext): abc.WithContext.__init__(self, context) WithDataContext.__init__(self, data_ctx)
def __init__(self, context: BolinetteContext, data_ctx: DataContext): abc.WithContext.__init__(self, context) WithDataContext.__init__(self, data_ctx) self.__props__ = ModelProps( self, self.data_ctx.db.get_engine(self.__blnt__.database))
def __init__(self, context: BolinetteContext, data_ctx: DataContext): abc.WithContext.__init__(self, context) WithDataContext.__init__(self, data_ctx) self.system_priority = 1 self.options: dict[str, MiddlewareParam] = {} self.params = MiddlewareParams()