(self, data, request=None, response=None, context=None)
| 765 | self._outputs = outputs |
| 766 | |
| 767 | def transform_data(self, data, request=None, response=None, context=None): |
| 768 | transform = self.transform |
| 769 | if hasattr(transform, "context"): |
| 770 | self.transform.context = context |
| 771 | """Runs the transforms specified on this endpoint with the provided data, returning the data modified""" |
| 772 | if transform and not (isinstance(transform, type) and isinstance(data, transform)): |
| 773 | if self._params_for_transform: |
| 774 | return transform( |
| 775 | data, **self._arguments(self._params_for_transform, request, response) |
| 776 | ) |
| 777 | else: |
| 778 | return transform(data) |
| 779 | return data |
| 780 | |
| 781 | def content_type(self, request=None, response=None): |
| 782 | """Returns the content type that should be used by default for this endpoint""" |
no test coverage detected