/srv/irclogs.ubuntu.com/2020/11/05/#launchpad-dev.txt

pieqHi!03:15
pieqI'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
pieqWould anyone have tips on how to do that?03:16
pieqFor 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
jelmerPieq: 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 filesystem22:05
jelmerI don't think I've seen any ready-made libraries out there that provide that22:05

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!