mirror of
https://github.com/jrconlin/oauthsimple.git
synced 2026-07-28 04:06:51 +00:00
Use reset for PHP
use proper exception param for python test
This commit is contained in:
+1
-2
@@ -35,8 +35,7 @@ error_reporting(E_ALL);
|
||||
|
||||
# Test 2 =====
|
||||
|
||||
$oauth=null;
|
||||
$oauth = new OAuthSimple($apiKey,$sharedSecret);
|
||||
$oauth->reset();
|
||||
$sample2Results = $oauth->sign(Array('action'=>'GET',
|
||||
'path'=>$path,
|
||||
'parameters'=>$argumentsAsObject));
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
TOP = $(shell pwd)
|
||||
VE = virtualenv
|
||||
PY = $(TOP)/bin/python
|
||||
EZ = $(TOP)/bin/easy_install
|
||||
|
||||
.PHONY: build build-egg
|
||||
|
||||
build:
|
||||
$(VE) --no-site-packages .
|
||||
|
||||
build-egg:
|
||||
$(PY) setup.py bdist_egg -dist-dir dist
|
||||
@@ -43,7 +43,7 @@ class TestOAuth(unittest.TestCase):
|
||||
# send the link.
|
||||
try:
|
||||
rsp=urllib2.urlopen(signed.get('signed_url'))
|
||||
except urllib2.HTTPError as ex:
|
||||
except urllib2.HTTPError, ex:
|
||||
if (ex.headers.get('x-mashery-error-code') ==
|
||||
'ERR_401_TIMESTAMP_IS_INVALID'):
|
||||
print "Your clock is off. Check and retry."
|
||||
|
||||
Reference in New Issue
Block a user