pieq | Hi! | 03:15 |
---|---|---|
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:16 |
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? | 03:17 |
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 | 22:05 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!