Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide Mock classes #194

Open
2e0byo opened this issue Sep 3, 2023 · 0 comments
Open

Provide Mock classes #194

2e0byo opened this issue Sep 3, 2023 · 0 comments

Comments

@2e0byo
Copy link
Collaborator

2e0byo commented Sep 3, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant