Permalink
Browse files

logging send and sign request

  • Loading branch information...
1 parent c72ae58 commit 3cf6930c2644b99ca7091e3c3d5ddc6dd23db2e2 @zalun zalun committed May 15, 2012
Showing with 2 additions and 15 deletions.
  1. +0 −14 apps/amo/tests/auth_tests.py
  2. +2 −1 utils/amo.py
@@ -66,19 +66,5 @@ class Http:
"occupation": "addon developer"
})))
httplib2.Http = Mock(return_value=Http())
- #AMOOAuth._request = Mock(return_value=(
- # Response(),
- # json.dumps({
- # "username": "some",
- # "display_name": "Some User",
- # "created": "2007-03-05 13:09:38",
- # "modified": "2012-01-31 12:38:50",
- # "id": 12345,
- # "location": "Portland, OR",
- # "homepage": "http://example.com",
- # "email": "some@example.com",
- # "occupation": "addon developer"
- # }))
- # )
eq_(fetch_amo_user('some@example.com')['username'],
'some')
View
@@ -106,13 +106,14 @@ def get_csrf(self, content):
content).groups()[0]
def _request(self, token, method, url, data={}, headers={}, **kw):
- log.debug('I am actually called')
parameters = data_keys(data)
parameters.update(kw)
request = (oauth.Request
.from_consumer_and_token(self.get_consumer(), token,
method, url, parameters))
+ log.debug('request created')
request.sign_request(self.signature_method, self.get_consumer(), token)
+ log.debug('request signed')
client = httplib2.Http()
if data and method == 'POST':
data = encode_multipart(boundary, data)

0 comments on commit 3cf6930

Please sign in to comment.