diff options
author | Ib Lundgren <ib.lundgren@gmail.com> | 2013-07-09 17:48:25 +0100 |
---|---|---|
committer | Ib Lundgren <ib.lundgren@gmail.com> | 2013-07-09 17:48:25 +0100 |
commit | 5a9d57dd5f179102ed95cbc75986f913bb6fb326 (patch) | |
tree | 21012aef3df768c81f863049d0f2db3e968e2023 /tests | |
parent | 03735492b33b1ce8ac8a7fb05fcd017d26d443d7 (diff) | |
parent | adb64a0835aeb5e1cbf49952cd25a2510dae70bb (diff) | |
download | oauthlib-5a9d57dd5f179102ed95cbc75986f913bb6fb326.tar.gz |
Merge branch 'master' of https://github.com/scfarley/oauthlib into scfarley-master
Diffstat (limited to 'tests')
-rw-r--r-- | tests/oauth1/rfc5849/test_utils.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/oauth1/rfc5849/test_utils.py b/tests/oauth1/rfc5849/test_utils.py index 3e6ce2d..59ee744 100644 --- a/tests/oauth1/rfc5849/test_utils.py +++ b/tests/oauth1/rfc5849/test_utils.py @@ -42,6 +42,11 @@ class UtilsTests(TestCase): oauth_timestamp="137131201", oauth_nonce="7d8f3e4a", oauth_signature="djosJKDKJSD8743243%2Fjdk33klY%3D" """.strip() + bad_authorization_headers = ( + "OAuth", + "OAuth oauth_nonce=", + "Negotiate b2F1dGhsaWI=", + ) def test_filter_params(self): @@ -127,3 +132,7 @@ class UtilsTests(TestCase): ('oauth_token', 'kkk9d7dh3k39sjv7'), ('realm', 'Example')] self.assertEqual(sorted(authorization_headers), sorted(correct_headers)) + + # Check against malformed headers. + for header in self.bad_authorization_headers: + self.assertRaises(ValueError, parse_authorization_header, header) |