rewire a bit the Covalent adapters to simplify the code.
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.
Two quick refactorings here:
Quote
andHistoricalPrice
fromTreasury
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, cleanMockResponse
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.