Skip to content

Commit

Permalink
Merge commit 'd8fdecb8e844b4b08be35967e0797360d8ce0a3a'
Browse files Browse the repository at this point in the history
  • Loading branch information
Simple Geebus committed Feb 4, 2011
2 parents b330ce8 + d8fdecb commit 390ae74
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_oauth.py
Expand Up @@ -545,6 +545,17 @@ def test_get_normalized_parameters_empty(self):

self.assertEquals(expected, res)

def test_get_normalized_parameters_duplicate(self):
url = "http://example.com/v2/search/videos?oauth_nonce=79815175&oauth_timestamp=1295397962&oauth_consumer_key=mykey&oauth_signature_method=HMAC-SHA1&q=car&oauth_version=1.0&offset=10&oauth_signature=spWLI%2FGQjid7sQVd5%2FarahRxzJg%3D"

req = oauth.Request("GET", url)

res = req.get_normalized_parameters()

expected='oauth_consumer_key=mykey&oauth_nonce=79815175&oauth_signature=spWLI%2FGQjid7sQVd5%2FarahRxzJg%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1295397962&oauth_version=1.0&offset=10&q=car'

self.assertEquals(expected, res)

def test_get_normalized_parameters_from_url(self):
# example copied from
# https://github.com/ciaranj/node-oauth/blob/master/tests/oauth.js
Expand Down

0 comments on commit 390ae74

Please sign in to comment.