Hello, I am venturing off to write a module which will act as a wrapper around an online API provided by a third party. I am trying to plan ahead of time how the tests for it will work.
On the one hand, I am thinking that creating a test with the module that accesses the actual online service might be the most accurate way of testing things, on the other hand I am not sure if this is the "canonical" way of doing things. I have done some reading around and some people suggested that instead of hitting the actual online source one should mock the output it returns tand take it from there. In the past, I have actually written tests to hit the live server but I am wondering if there's another way to this. Is there any standard way for this sort of thing? thank you for your help, Spiros