예제 #1
0
파일: help.py 프로젝트: zmchu/stem
 def test_signal_help(self):
     result = response(CONTROLLER, 'SIGNAL')
     self.assertTrue(
         'Issues a signal that tells the tor process to' in result)
     self.assertTrue(
         '\x1b[34;1mRELOAD / HUP   \x1b[0m\x1b[34m - reload our torrc' in
         result)
예제 #2
0
파일: help.py 프로젝트: zmchu/stem
 def test_getconf_help(self):
     result = response(CONTROLLER, 'GETCONF')
     self.assertTrue(
         'Provides the current value for a given configuration value. Options include...'
         in result)
     self.assertTrue(
         '\x1b[34mExitNodes                                 ExitPolicy' in
         result)
예제 #3
0
파일: help.py 프로젝트: zmchu/stem
 def test_getinfo_help(self):
     result = response(CONTROLLER, 'GETINFO')
     self.assertTrue(
         'Queries the tor process for information. Options are...' in
         result)
     self.assertTrue(
         '\x1b[34;1minfo/names                       \x1b[0m\x1b[34m - List of GETINFO options, types, and documentation.'
         in result)
예제 #4
0
파일: help.py 프로젝트: patrickod/stem
 def test_usefeature_help(self):
   result = response(CONTROLLER, 'USEFEATURE')
   self.assertTrue('Customizes the behavior of the control port.' in result)
   self.assertTrue('\x1b[34mVERBOSE_NAMES EXTENDED_EVENTS\x1b[0m' in result)
예제 #5
0
파일: help.py 프로젝트: patrickod/stem
 def test_setevents_help(self):
   result = response(CONTROLLER, 'SETEVENTS')
   self.assertTrue('Sets the events that we will receive.' in result)
   self.assertTrue('\x1b[34mBW                  DEBUG               INFO                NOTICE\x1b[0m' in result)
예제 #6
0
파일: help.py 프로젝트: patrickod/stem
 def test_signal_help(self):
   result = response(CONTROLLER, 'SIGNAL')
   self.assertTrue('Issues a signal that tells the tor process to' in result)
   self.assertTrue('\x1b[34;1mRELOAD / HUP   \x1b[0m\x1b[34m - reload our torrc' in result)
예제 #7
0
파일: help.py 프로젝트: patrickod/stem
 def test_getconf_help(self):
   result = response(CONTROLLER, 'GETCONF')
   self.assertTrue('Provides the current value for a given configuration value. Options include...' in result)
   self.assertTrue('\x1b[34mExitNodes                                 ExitPolicy' in result)
예제 #8
0
파일: help.py 프로젝트: patrickod/stem
 def test_getinfo_help(self):
   result = response(CONTROLLER, 'GETINFO')
   self.assertTrue('Queries the tor process for information. Options are...' in result)
   self.assertTrue('\x1b[34;1minfo/names                       \x1b[0m\x1b[34m - List of GETINFO options, types, and documentation.' in result)
예제 #9
0
파일: help.py 프로젝트: patrickod/stem
 def test_general_help(self):
   result = response(CONTROLLER, '')
   self.assertTrue('Interpreter commands include:' in result)
   self.assertTrue('\x1b[34;1m  GETINFO\x1b[0m\x1b[34m - queries information from tor\x1b[0m\n' in result)
예제 #10
0
파일: help.py 프로젝트: patrickod/stem
 def test_unrecognized_option(self):
   result = response(CONTROLLER, 'FOOBAR')
   self.assertEqual("\x1b[1;31mNo help information available for 'FOOBAR'...\x1b[0m", result)
예제 #11
0
파일: help.py 프로젝트: zmchu/stem
 def test_usefeature_help(self):
     result = response(CONTROLLER, 'USEFEATURE')
     self.assertTrue(
         'Customizes the behavior of the control port.' in result)
     self.assertTrue(
         '\x1b[34mVERBOSE_NAMES EXTENDED_EVENTS\x1b[0m' in result)
예제 #12
0
파일: help.py 프로젝트: zmchu/stem
 def test_setevents_help(self):
     result = response(CONTROLLER, 'SETEVENTS')
     self.assertTrue('Sets the events that we will receive.' in result)
     self.assertTrue(
         '\x1b[34mBW                  DEBUG               INFO                NOTICE\x1b[0m'
         in result)
예제 #13
0
파일: help.py 프로젝트: zmchu/stem
 def test_general_help(self):
     result = response(CONTROLLER, '')
     self.assertTrue('Interpreter commands include:' in result)
     self.assertTrue(
         '\x1b[34;1m  GETINFO\x1b[0m\x1b[34m - queries information from tor\x1b[0m\n'
         in result)
예제 #14
0
파일: help.py 프로젝트: zmchu/stem
 def test_unrecognized_option(self):
     result = response(CONTROLLER, 'FOOBAR')
     self.assertEqual(
         "\x1b[1;31mNo help information available for 'FOOBAR'...\x1b[0m",
         result)