edmundmok / mealpy

Order your meals on MealPal automatically!
MIT License
28 stars 22 forks source link

Add some tests #14

Closed ipwnponies closed 5 years ago

ipwnponies commented 5 years ago

Let's add tests. More useful are the expected request response, having that schema or structure somewhere can make it easier to work on the code wihtout need to make a request every time. Mealpal responses also change based on time of day or week, when the "kitchen is closed", so this further unblocked development.

ipwnponies commented 5 years ago

I have dumps of many of the responses, I'm going to sanitize them and give some structure to the requests. i.e. request.json() returns dict, but would it's be great if we converted it to a dataclass for our sanity.

ipwnponies commented 5 years ago

With #20 and #25, we have some test coverage. Probably coverage over the parts that won't chagne too much. We'll continue iteratively adding tests for new stuff. I'll also do a scan and pragma: no cover the code pieces that have little value to test, typically boilerplate and package glue.