[03:15] <pieq> Hi!
[03:16] <pieq> I'm working on a small Python app that retrieves data from Launchpad using launchpadlib, but I'm having troubles figuring out how to write unit tests for it.
[03:16] <pieq> Would anyone have tips on how to do that?
[03:17] <pieq> For instance, I have an object that, when instanciated, gets a "lp_project" attribute by getting launchpad.projects[project_name] ; how can I simulate that in a unit test without actually connecting to launchpad?
[22:05] <jelmer> Pieq: one option would be to mock the launchpad object or to create a custom implementation of the launchpad lib API backed by e.g. memory or a filesystem
[22:05] <jelmer> I don't think I've seen any ready-made libraries out there that provide that