def execute(self, response, autofixture):
        """Generates fixture objects from the given response and stores them
        in the application-specific cache.

        :param response: the recorded :class:`Response`
        :param autofixture: the active :class:`AutoFixture`
        """
        if not has_request_context:
            return

        try:
            app = autofixture.app

            # Create response fixture
            fixture = Fixture.from_response(response, app, self.request_name)
            autofixture.add_fixture(fixture)

            # Create request fixture
            if request.data:
                fixture = Fixture.from_request(request, app, self.request_name)
                autofixture.add_fixture(fixture)
        except __HOLE__:  # pragma: no cover
            warnings.warn("Could not create fixture for unsupported mime type")

        return response
dataset/ETHPy150Open janukobytsch/flask-autofixture/flask_autofixture/command.py/CreateFixtureCommand.execute