bitly / bitly-api-python

python library to the bitly api
http://github.com/bitly/bitly-api-python
Other
244 stars 92 forks source link

RATE_LIMIT_EXCEEDED when using nosetests #12

Closed ianozsvald closed 11 years ago

ianozsvald commented 11 years ago

Having just checked out the repo I ran the tests and received:

$ nosetests test_bitly_api.py EE..

ERROR: test_bitly_api.testApi ... raise BitlyError(data.get('status_code', 500), data.get('status_txt', 'UNKNOWN_ERROR')) BitlyError: RATE_LIMIT_EXCEEDED ... ERROR: test_bitly_api.testExpand ... raise BitlyError(data.get('status_code', 500), data.get('status_txt', 'UNKNOWN_ERROR')) BitlyError: RATE_LIMIT_EXCEEDED

Can your API key be whitelisted to allow these tests to pass, or perhaps you should force us to use our own API key (environment variable? local config file?), such that all the tests pass on a clean checkout?

jehiah commented 11 years ago

The tests are a little out of date, and do need to be updated to use an access token instead of login/apiKey. As you mention, it would be good to take that token via environment variables. If you are interested in contributing updates for those changes I'd love to see them.

ianozsvald commented 11 years ago

Tests updated, pull request made using OS Environment variables. This works for me, it may not fit other OAuth uses and so might require further changing for your other users?

jehiah commented 11 years ago

awesome. i'm going to close this, and we can continue discussing in #13