nullcount / rain

Evaporate stagnant liquidity from source nodes and condensate to sinks. Make it rain.
MIT License
2 stars 5 forks source link

Create testing pipeline #6

Closed nullcount closed 1 year ago

nullcount commented 1 year ago

Start by testing strategies.

Our test should create multiple instances of each strategy class and instead of loading data from API's, it should fill all attributes with mock data to test all the different execution flows.

just set up the structure for testing and do a simple test, will add more tests as we go.

  1. modify the SinkSource class in strategy.py so that it can optionally instantiate it's attributes with data from a python dict instead of reaching out to APIs.
  2. create a tests folder files for testing each strategy.
  3. create a test instance of the SinkSource class and instantiate it with mock data
  4. call SinkSource.ececute() and assert that the execution path is as expected