python-amazon-paapi icon indicating copy to clipboard operation
python-amazon-paapi copied to clipboard

[Nice to have] Include a test suite that includes a mock Amazon object with all potential values

Open YPCrumble opened this issue 4 years ago • 2 comments

It would be really nice to have a test suite for the repo. In particular, including something like mocks.py that includes a mock product returned by this repo would help users to unit test our applications.

I may have time to start on this - I focus only on books but could be a good start to creating a test suite for this repo.

Would also be nice to show code coverage and test suite status on CI.

YPCrumble avatar Mar 12 '20 14:03 YPCrumble

A mock of the Amazon SDK's return value would also work. You would be able to use that mock for unit testing this application, and as a developer I could simply parse that mock to unit test my application. Basically a mock product object that includes a mock value for every single potential attribute.

Thanks again for making this repo!

YPCrumble avatar Mar 12 '20 15:03 YPCrumble

That's a very good idea, it would also help me testing the wrapper at development. I want to work first on refining the product instance structure, and then we can work on the test suite. Keep you posted.

sergioteula avatar Mar 13 '20 19:03 sergioteula