To give my vagueposting some specifics in the unlike event someone's interested in helping me firm up my understanding of #python unit testing. I'm trying to test https://github.com/feoh/omnia_atari/blob/collections/omnia_atari.py#L25 which on the one hand seems too trivial a function to bother testing, but I see people do it all the time.
So, do I create mock Search, Results, and Item objects and feedl them to the actual function with mocks applied so it never actually calls the API? Am I insane to think I should even be testing this function?
@feoh I would consider not bothering with a unit test, personally, but if you must, I would just make a mock Item class that has files with names, and pass that in. Use `cast()` to make the type checker happy.
The Wandering Shop is a Mastodon instance initially geared for the science fiction and fantasy community but open to anyone. We want our 'local' timeline to have the feel of a coffee shop at a good convention: tables full of friendly conversation on a wide variety of topics. We welcome everyone who wants to participate, so long as you're willing to abide by our code of conduct.