Comments (7)
Christopher I have a test in tests/tests.py
named test_twitter_oauth_get_token
that requests this URL and it's passing with version 0.2.2 of requests-oauth and latest requests library.
Please make sure you are using latest version of requests-oauth
(beware of the name change I did some time ago, it's not requests-oauth-hook anymore). If you are using the right version, I will need you to post some extra code, because I cannot reproduce the bug.
Cheers,
Miguel
from requests-oauth.
I cloned the latest requests-oauth into a new directory. Filled in
test_settings.py (btw, you need to change the settings in there, as it
requires a TWITTER_CONSUMER_KEY and TWITTER_CONSUMER_SECRET, and the
unset settings are for TWITTER_ACCESS_TOKEN and stuff.
I ran discover, and got the following:
C:\Users\Q\others\requests-oauth>discover
EEE.F.F
ERROR: test_rdio_oauth_get_token_data (tests.tests.OAuthTestSuite)
Traceback (most recent call last):
File "C:\Users\Q\others\requests-oauth\tests\tests.py", line 63, in
test_rdio_
oauth_get_token_data
self.assertTrue(response['oauth_token'])
KeyError: 'oauth_token'
ERROR: test_rdio_oauth_get_token_params (tests.tests.OAuthTestSuite)
Traceback (most recent call last):
File "C:\Users\Q\others\requests-oauth\tests\tests.py", line 70, in
test_rdio_
oauth_get_token_params
self.assertTrue(response['oauth_token'])
KeyError: 'oauth_token'
ERROR: test_twitter_delete (tests.tests.OAuthTestSuite)
Depends on GET and POST also working properly, as we must first
determine the cu
rrent username and then create a test list to subsequently delete.
Traceback (most recent call last):
File "C:\Users\Q\others\requests-oauth\tests\tests.py", line 44, in
test_twitt
er_delete
screen_name =
json.loads(client.get('https://api.twitter.com/1/account/verif
y_credentials.json').content)['screen_name']
KeyError: 'screen_name'
FAIL: test_twitter_rate_limit_GET (tests.tests.OAuthTestSuite)
Traceback (most recent call last):
File "C:\Users\Q\others\requests-oauth\tests\tests.py", line 28, in
test_twitt
er_rate_limit_GET
self.assertEqual(json.loads(response.content)['hourly_limit'], 350)
AssertionError: 150 != 350
FAIL: test_twitter_status_POST (tests.tests.OAuthTestSuite)
Traceback (most recent call last):
File "C:\Users\Q\others\requests-oauth\tests\tests.py", line 34, in
test_twitt
er_status_POST
self.assertEqual(response.status_code, 200)
AssertionError: 401 != 200
Ran 7 tests in 3.205s
FAILED (failures=2, errors=3)
C:\Users\Q\others\requests-oauth>
Not sure if I'm not doing something right, but this is with latest
Requests, now 0.8.2, and latest requests-oauth from Github.
On 11/20/2011 6:09 AM, Miguel Araujo wrote:
Christopher I have a test in
tests/tests.py
namedtest_twitter_oauth_get_token
that requests this URL and it's passing with version 0.2.2 of requests-oauth and latest requests library.Please make sure you are using latest version of
requests-oauth
(beware of the name change I did some time ago, it's not requests-oauth-hook anymore). If you are using the right version, I will need you to post some extra code, because I cannot reproduce the bug.Cheers,
Miguel
Reply to this email directly or view it on GitHub:
#6 (comment)
from requests-oauth.
Christopher can we please talk about this issue publicly?
You've told me you've got all tests running excepting the request token one. What did you do to make them work?
Have you tried for example requests-oauth 0.2.3 with requests 0.7 to see if it works?
This might be related to the fact that you are using a Windows box? I don't have a way to reproduce the problems you have, all tests run right in my Linux box.
Cheers,
Miguel
from requests-oauth.
For the tests, I expected the test to retrieve the access token. It did
not, once I plugged in one it worked fine.
0.2.1 is the last version of requests-oauth that works with the 0.7.x
series of requests. With 0.2.2 there's some issue regarding cookie
support -- I think requests 0.8 stops using a dict for cookies or
something. and 0.2.2 expects this and won't work with older versions.
I'm getting variable-length postdata requests, ranging from 298
(failing) 299-301 (succeeding)
These are requests to access_token once I have an oauth_verifier.
On 11/25/2011 6:21 AM, Miguel Araujo wrote:
Christopher can we please talk about this issue publicly?
You've told me you've got all tests running excepting the request token one. What did you do to make them work?
Have you tried for example requests-oauth 0.2.3 with requests 0.7 to see if it works?
This might be related to the fact that you are using a Windows box? I don't have a way to reproduce the problems you have, all tests run right in my Linux box.
Cheers,
Miguel
Reply to this email directly or view it on GitHub:
#6 (comment)
from requests-oauth.
There are several things you could try to debug this:
- Add a verbose flag to requests-oauth that prints several parameters from the request, to compare what differs from one version to other. Things like
request.params
,request.headers
,request.cookies
,request.url
etc. - Maybe you could post the different postdata results, not only the lengths, so I can inspect them to see if I find a difference.
- Try to run the test that fails alone, only that single test, to make sure other tests don't have side effects on it.
Remember that this could be an issue related to requests-oauth or to requests itself. Thanks for trying this hard on fixing the issue.
Cheers,
Miguel
from requests-oauth.
Any progress on this?
Future version of requests-oauth is now in dev
branch. You can try it out if you want, to see if it fixes your issue.
from requests-oauth.
I've just release version 0.3.0 of requests-oauth
Could you please try to see if you can reproduce this bug?
If I don't get an answer, i will be closing the issue, sorry.
from requests-oauth.
Related Issues (20)
- Determining if consumer_key/secret exist HOT 7
- OauthHook not passing in oauth_* to Request in auth_header=False HOT 10
- Python 3 support HOT 5
- Breaks with requests==0.12.1. HOT 4
- AttributeError in urllib.py raised using requests-oauth and Imgur's API HOT 3
- Using only consumer_key and consumer_secret breaks POST requests HOT 2
- Invalid signature generation with double encoding HOT 2
- Trouble POSTing UTF-8 data HOT 1
- POST with utf-8 not correctly catched HOT 3
- AttributeError: 'Request' object has no attribute '_enc_params' HOT 2
- Signing broke with parameters that have a None value
- Signature broken when using `params` argument with requests.get HOT 2
- Using header_auth=False with put hoists the PUT parameters into the query string
- correct url getting 400 status
- Can't import modules correctly HOT 2
- Broken with update of python-requests HOT 3
- Can this library handle refresh requests using oauth_session_handle
- Value Error
- Does this package support Python 3?
- Persistent HTTPS connections?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from requests-oauth.