python-tidal icon indicating copy to clipboard operation
python-tidal copied to clipboard

Provide Mock classes

Open 2e0byo opened this issue 1 year ago • 0 comments

Consumers want to test passing around valid tracks/artists/etc. Our current design makes this sufficiently hard that the best way is to use Mock(). It would be good to make it possible to spin up a valid Artist/Album/Track etc without needing e.g. a valid session.

This might be done in several ways:

  • provide a MockSession (initially just Mock(spec=Session)) and a way of creation objects against it (probably via .new).
  • decouple our datastructures further from how we get them

I've not thought deeply about the challenges of doing this. Some of the workarounds can be seen in the tests for mopidy-tidal.

2e0byo avatar Sep 03 '23 16:09 2e0byo