def post_outcome_request(self):
        '''
        POST an OAuth signed request to the Tool Consumer.
        '''
        if not self.has_required_attributes():
            raise InvalidLTIConfigError(
                'OutcomeRequest does not have all required attributes')

        consumer = oauth2.Consumer(key=self.consumer_key,
                                   secret=self.consumer_secret)

        client = oauth2.Client(consumer)
        # monkey_patch_headers ensures that Authorization
        # header is NOT lower cased
        monkey_patch_headers = True
        monkey_patch_function = None
        if monkey_patch_headers:
            import httplib2
            http = httplib2.Http

            normalize = http._normalize_headers

            def my_normalize(self, headers):
                print("My Normalize", headers)
                ret = normalize(self, headers)
                if ret in 'authorization':
                    ret['Authorization'] = ret.pop('authorization')
                print("My Normalize", ret)
                return ret
            http._normalize_headers = my_normalize
            monkey_patch_function = normalize

        response, content = client.request(
            self.lis_outcome_service_url,
            'POST',
            body=self.generate_request_xml(),
            headers={'Content-Type': 'application/xml'})

        if monkey_patch_headers and monkey_patch_function:
            import httplib2
            http = httplib2.Http
            http._normalize_headers = monkey_patch_function

        self.outcome_response = OutcomeResponse.from_post_response(response,
                                                                   content)
        return self.outcome_response
dataset/ETHPy150Open tophatmonocle/ims_lti_py/ims_lti_py/outcome_request.py/OutcomeRequest.post_outcome_request/swapped operands of `in`