Giter Club home page Giter Club logo

Comments (7)

maraujop avatar maraujop commented on July 21, 2024

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.

ctoth avatar ctoth commented on July 21, 2024

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 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


Reply to this email directly or view it on GitHub:
#6 (comment)

from requests-oauth.

maraujop avatar maraujop commented on July 21, 2024

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.

ctoth avatar ctoth commented on July 21, 2024

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.

maraujop avatar maraujop commented on July 21, 2024

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.

maraujop avatar maraujop commented on July 21, 2024

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.

maraujop avatar maraujop commented on July 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.