fixed broken unit test, and moved out setting up appengine apps into its own method so that it can be used for starting new apps and restarting existing ones