The above could possibly be replaced with `amo.tests.addon_factory`. I'm not sure if it does everything you need or not.