Closed simonporter007 closed 8 years ago
I just started to look at the tests. I'm not sure that mocking is the right idea. The propose of the tests is to detect whether we broke something, as well as detect when Pushbullet break something. If Pushbullet ever change the API (which is not very likely, but still) we would like to find that out by running the tests.
P.S. I just pushed 6c54610eea1fa14ff2cd6448776f1101e8c6a9eb which allows running the tests with your personal account.
Ok. So if my reading (of testing) is correct, you're wanting those to be integration tests then rather than unit tests? Not a problem then. I was looking to try some TDD, so I can keep these offline in that case. Thanks for replying!
That's my personal opinion, but I'm 1 collaborator out of 4. :smiley: Also, thank you for your recent pull requests.
No problem! Just trying to improve my developing. Plus pushbullet is great :)
I guess this is a question more than an issue. I'd like to help out writing the tests but I'm still wrapping my head around writing tests in python to be honest.
Had a look at the
test_auth.py
that's already included. From what I have been reading it would seem better if we mocked the call instead of actually called a login to Pushbullet. I wrote some code which I think does the trick but I guess the question is, is this the proper way to mock it out? I notice there's no test_pushbullet yet, so I can't quite see how you would do it properly.If this IS the way to do it and the above is valid, I'd love to see what else I can knock up. Though as I say, literally just getting started in this area!
Cheers,