summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJonathan Huot <JonathanHuot@users.noreply.github.com>2019-05-06 16:12:23 +0200
committerGitHub <noreply@github.com>2019-05-06 16:12:23 +0200
commit3644d7b58249420ef046b5694ad0e390a14bf87d (patch)
treefc478dacf8b64acb2525387b9c4657ef34405ff9 /tests
parentd4d3f1088dc943a83641c9e86b7a09d98f6adce8 (diff)
parentc376e2797171ae06efa5808c9b8e3fae2fd0579b (diff)
downloadoauthlib-3644d7b58249420ef046b5694ad0e390a14bf87d.tar.gz
Merge branch 'master' into oidc-hashesoidc-hashes
Diffstat (limited to 'tests')
-rw-r--r--tests/oauth1/rfc5849/endpoints/test_base.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/oauth1/rfc5849/endpoints/test_base.py b/tests/oauth1/rfc5849/endpoints/test_base.py
index 60f7860..795ddee 100644
--- a/tests/oauth1/rfc5849/endpoints/test_base.py
+++ b/tests/oauth1/rfc5849/endpoints/test_base.py
@@ -4,7 +4,7 @@ from re import sub
from mock import MagicMock
-from oauthlib.common import safe_string_equals
+from oauthlib.common import CaseInsensitiveDict, safe_string_equals
from oauthlib.oauth1 import Client, RequestValidator
from oauthlib.oauth1.rfc5849 import (SIGNATURE_HMAC, SIGNATURE_PLAINTEXT,
SIGNATURE_RSA, errors)
@@ -179,6 +179,17 @@ class BaseEndpointTest(TestCase):
self.assertRaises(errors.InvalidRequestError,
e._check_mandatory_parameters, r)
+ def test_case_insensitive_headers(self):
+ """Ensure headers are case-insensitive"""
+ v = RequestValidator()
+ e = BaseEndpoint(v)
+ r = e._create_request('https://a.b', 'POST',
+ ('oauth_signature=a&oauth_consumer_key=b&oauth_nonce=c&'
+ 'oauth_version=1.0&oauth_signature_method=RSA-SHA1&'
+ 'oauth_timestamp=123456789a'),
+ URLENCODED)
+ self.assertIsInstance(r.headers, CaseInsensitiveDict)
+
def test_signature_method_validation(self):
"""Ensure valid signature method is used."""