def setup(self): self.graph = create_object_graph(name="example", testing=True) self.ns = Namespace(subject="file") self.relation_ns = Namespace(subject=Person, object_="file") self.controller = FileController() UPLOAD_MAPPINGS = { Operation.Upload: EndpointDefinition( func=self.controller.upload, request_schema=FileExtraSchema(), ), } UPLOAD_FOR_MAPPINGS = { Operation.UploadFor: EndpointDefinition( func=self.controller.upload_for_person, request_schema=FileExtraSchema(), response_schema=FileResponseSchema(), ), } configure_upload(self.graph, self.ns, UPLOAD_MAPPINGS) configure_upload(self.graph, self.relation_ns, UPLOAD_FOR_MAPPINGS) configure_swagger(self.graph) self.client = self.graph.flask.test_client()
def setup(self): self.graph = create_object_graph(name="example", testing=True) self.ns = Namespace(subject="foo") configure_crud(self.graph, self.ns, FOO_MAPPINGS) configure_swagger(self.graph) self.client = self.graph.flask.test_client()
def setup(self): self.graph = create_object_graph(name="example", testing=True) self.ns = Namespace(subject=Person, ) configure_crud(self.graph, self.ns, PERSON_MAPPINGS) configure_alias(self.graph, self.ns, PERSON_MAPPINGS) self.graph.config.swagger_convention.operations.append("alias") configure_swagger(self.graph) self.client = self.graph.flask.test_client()
def setup(self): self.graph = create_object_graph(name="example", testing=True) self.ns = Namespace(subject="file") self.relation_ns = Namespace(subject=Person, object_="file") configure_upload(self.graph, self.ns, UPLOAD_MAPPINGS) configure_upload(self.graph, self.relation_ns, UPLOAD_FOR_MAPPINGS) configure_swagger(self.graph) self.client = self.graph.flask.test_client()
def setup(self): self.graph = create_object_graph(name="example", testing=True) self.ns = Namespace( subject=Person, ) configure_crud(self.graph, self.ns, PERSON_MAPPINGS) configure_alias(self.graph, self.ns, PERSON_MAPPINGS) self.graph.config.swagger_convention.operations.append("alias") configure_swagger(self.graph) self.client = self.graph.flask.test_client()