def test_main_template_error(self): # setup the default app first to add the sources with self.app as app: app.sources.add(self.rando, self.tmp_dir, local=True) try: main(['create', '-t', 'bogus:bogus_template', self.tmp_dir]) except exc.BossSourceError as e: self.eq(e.msg, "Source repo 'bogus' does not exist.") raise
def test_main_no_args(self): try: main() except SystemExit as e: self.eq(e.code, 1) raise
def test_main_argument_error(self): try: main(['create']) except SystemExit as e: self.eq(e.code, 1) raise
def test_main_template_error(self): try: main(['create', '-t', 'bogus:bogus_template', self.tmp_dir]) except SystemExit as e: self.eq(e.code, 1) raise
def test_template_error(self): # setup the default app first to add the sources with self.app as app: app.sources.add(self.rando, self.tmp_dir, local=True) main(['create', '-t', '%s:bogus_template' % self.rando, self.tmp_dir])
def test_missing_data_dir(self): shutil.rmtree(self.tmp_dir) main(['templates']) self.ok(os.path.exists(self.tmp_dir))
def test_main_argument_error(self): main(['create'])
def test_main_no_args(self): main([])
def test_main_no_args_using_sysv(self): main()