python-tidal
python-tidal copied to clipboard
Provide Mock classes
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 justMock(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.