Beispiel #1
0
 def extra_options(self):
     return [
         CommandLineOption(name='no-debug',
                           help='Turns off debug option',
                           type=BOOL,
                           default_value=None),
         CommandLineOption(name='no-keep-alive',
                           help='Turns off Keep alive option',
                           type=BOOL),
         CommandLineOption(name='no-chroot',
                           help='Turns off Chroot option',
                           type=BOOL)
     ]
Beispiel #2
0
 def test_default_dest(self):
     opt = CommandLineOption(name="no-debug",
                             type=BOOL,
                             default_value=False)
     self.assertEquals('--no-debug', opt.name)
     self.assertEquals('store_false', opt.action)
     self.assertEquals('no_debug', opt.dest)
Beispiel #3
0
 def test_bool_default_true(self):
     opt = CommandLineOption(name="debug",
                             type=BOOL,
                             dest='debug',
                             default_value=True)
     self.assertEquals('--debug', opt.name)
     self.assertEquals('store_true', opt.action)
     self.assertEquals('debug', opt.dest)
Beispiel #4
0
 def test_int_correct_type(self):
     opt = CommandLineOption(name="workers", type=INT)
     self.assertEquals(int, opt.type)
Beispiel #5
0
 def test_bool_correct_type(self):
     opt = CommandLineOption(name="no-debug",
                             type=BOOL,
                             default_value=False)
     self.assertEquals(bool, opt.type)
Beispiel #6
0
 def test_default_action(self):
     opt = CommandLineOption(name="no-debug", default_value=False)
     self.assertEquals('store', opt.action)
Beispiel #7
0
 def extra_options(self):
     return [CommandLineOption(name='send-signal', \
                               help = 'Choose a custom signal to send to master/workers processes. Default signal is SIGTERM.',\
                               type=INT, default_value = signal.SIGTERM)]
Beispiel #8
0
Datei: init.py Projekt: lwc/wsgid
 def extra_options(self):
     return [
         CommandLineOption(name='no-init',
                           help='Turns off debug option',
                           type=BOOL)
     ]