butterygg / whip

Treasury Risk Analytics Dashboard with Strategy Backtesting for DAOs
4 stars 2 forks source link

Refactor/treasury and covalent #79

Closed lajarre closed 2 years ago

lajarre commented 2 years ago

Two quick refactorings here:

On this second part, I've rewritten tests a tiny bit, by cutting them down and grouping them in a separate module specific to Covalent tests.
I believe these tests could be even simpler, for exemple avoiding usage of monkey patching only the the strict minimum, the MockResponse doesn't need it. We should rather build a new, clean MockResponse object each time we need to test against a different case.
I believe a good practice is to limit test modules (when using pytest) to small files, basically one file per function. I would help keep things simple.