예제 #1
0
    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
예제 #2
0
 def test_main_no_args(self):
     try:
         main()
     except SystemExit as e:
         self.eq(e.code, 1)
         raise
예제 #3
0
 def test_main_argument_error(self):
     try:
         main(['create'])
     except SystemExit as e:
         self.eq(e.code, 1)
         raise
예제 #4
0
 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
예제 #5
0
    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])
예제 #6
0
 def test_missing_data_dir(self):
     shutil.rmtree(self.tmp_dir)
     main(['templates'])
     self.ok(os.path.exists(self.tmp_dir))
예제 #7
0
 def test_main_argument_error(self):
     main(['create'])
예제 #8
0
 def test_main_no_args(self):
     main([])
예제 #9
0
 def test_main_no_args_using_sysv(self):
     main()
예제 #10
0
파일: main_tests.py 프로젝트: iamlos/boss
 def test_main_no_args(self):
     try:
         main()
     except SystemExit as e:
         self.eq(e.code, 1)
         raise
예제 #11
0
파일: main_tests.py 프로젝트: iamlos/boss
 def test_main_argument_error(self):
     try:
         main(['create'])
     except SystemExit as e:
         self.eq(e.code, 1)
         raise
예제 #12
0
파일: main_tests.py 프로젝트: iamlos/boss
 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