Thanks to Alan, Danny, Albert-Jan and Ben for their suggestions. I've now gotten my feet wet in unittest and have gone from not quite knowing where to start to making substantial progress, with a small suite of tests up and running.