Closed okuser closed 8 years ago
Hey! Thanks for doing this. Any chance you could write some tests?
I'm not sure how to write tests. I see the tests directory at the top level, but I don't know what to add there.
Just write some code that uses the features you are adding / hits the bugs you are fixing.
In the case of okcupyd, use the use_cassette
decorator from https://github.com/kevin1024/vcrpy
on your test function. This will record all outbound http requests and their responses when you run the test the first time. If you use the built in test recording functionality, it will automatically scrub your username and password from all http data.
Unfortunately I'm going to be traveling for the next couple weeks and won't have to time to write the tests (I also don't know particular profiles that trigger the problems in Issue #59 and Issue #58 ). I can try when I get back though.
Adds a RateLimiter class to session.py. Also fixes a problem in the ages regexp in looking_for.py and adds a workaround for an error that can occur in looking up properties by detail, both suggested by dubiousjim.