@@ -0,0 +1,1890 @@
+import os%0Aimport shutil%0Aimport subprocess%0Aimport pkg_resources%0A%0Afrom webtest import TestApp%0Afrom paste.deploy import loadapp%0Afrom paste.script.create_distro import CreateDistroCommand%0A%0AtestDataPath = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'data')%0A%0Aclass Options(object):%0A    simulate = False%0A    overwrite = True%0A    templates = %5B'moksha.master'%5D%0A    output_dir = testDataPath%0A    list_templates = False%0A    list_variables = False%0A    config = None%0A    inspect_files = False%0A    svn_repository = None%0A%0A%0Aclass QuickstartTester(object):%0A%0A    def setUp(self):%0A        command = CreateDistroCommand('MokshaQuickStartUnitTest')%0A        command.verbose = False%0A        command.simulate = False%0A        command.options = Options()%0A        command.interactive=False%0A        command.args=%5B%0A                'mokshatest', '--package=mokshatest',%0A                '--template=moksha.master',%0A                %5D%0A        for template in self.templates:%0A            command.args.append('--template=%25s' %25 template)%0A%0A        for arg in self.args:%0A            command.args.append('%25s=%25s' %25 (arg, self.args%5Barg%5D))%0A%0A        proj_dir = os.path.join(testDataPath, 'mokshatest')%0A        command.create_template(%0A                self.template('mokshatest'),%0A                proj_dir,%0A                self.template_vars)%0A        command.command()%0A%0A        self.oldcwd = os.getcwd()%0A        os.chdir(proj_dir)%0A        subprocess.Popen('paver egg_info', shell=True, stdout=subprocess.PIPE,%0A                         stderr=subprocess.PIPE).communicate()%0A%0A        pkg_resources.working_set.add_entry(proj_dir)%0A        reload(pkg_resources)%0A%0A        self.app = loadapp('config:/srv/moksha/development.ini',%0A                           relative_to=proj_dir)%0A        self.app = TestApp(self.app)%0A%0A    def tearDown(self):%0A        shutil.rmtree(testDataPath, ignore_errors=True)%0A        os.chdir(self.oldcwd)%0A

Split our quickstart boilerplate tests into a base module