Beispiel #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
Beispiel #2
0
 def test_main_no_args(self):
     try:
         main()
     except SystemExit as e:
         self.eq(e.code, 1)
         raise
Beispiel #3
0
 def test_main_argument_error(self):
     try:
         main(['create'])
     except SystemExit as e:
         self.eq(e.code, 1)
         raise
Beispiel #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
Beispiel #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])
Beispiel #6
0
 def test_missing_data_dir(self):
     shutil.rmtree(self.tmp_dir)
     main(['templates'])
     self.ok(os.path.exists(self.tmp_dir))
Beispiel #7
0
 def test_main_argument_error(self):
     main(['create'])
Beispiel #8
0
 def test_main_no_args(self):
     main([])
Beispiel #9
0
 def test_main_no_args_using_sysv(self):
     main()
Beispiel #10
0
 def test_main_no_args(self):
     try:
         main()
     except SystemExit as e:
         self.eq(e.code, 1)
         raise
Beispiel #11
0
 def test_main_argument_error(self):
     try:
         main(['create'])
     except SystemExit as e:
         self.eq(e.code, 1)
         raise
Beispiel #12
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