Closed atkinson closed 2 years ago
Let's just add end-to-end style tests for now, we can add unit tests after we get something reasonably close to a working version.
CC @arnaudj
Yes, works for me @atkinson
For my info, any idea how this would look like? eg, trigger a strategy via manage.py, run in dry/test mode, then: assert DB entries? (StrategyPositionRequest, TargetPosition)
Should we consider to mock something? I'll read up on django testing best practices.
Probably simplest to use this: https://pytest-django.readthedocs.io/en/latest/
... and invoke strategies programmatically.
Can invoke management commands programmatically as well if you like, e.g:
from django.core import management
management.call_command("rw_yolo", "param1")
Nothing crazy, just something to run through the install and execute the strategies (via management commands) without actually hitting exchanges.